-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blueprint Table #30
Blueprint Table #30
Conversation
Blueprint Table is a highly configurable UI component that provides standard UX for presenting tabular data. It is built using [React](https://facebook.github.io/react/) but usable with any front end framework. **Features** - Fixed column headers and row indices columns - Resizable columns and rows - Double-click column resize handles for auto-sizing - Viewport-only rendering for scale (a.k.a. _lazy_ rendering) - Robust selections (columns, rows, or multiple cell regions) - Right-click to copy cell region contents - Inline editable column headers & cells (/) Unit test covered (/) Documented (/) Feature gallery
lint and test | Preview |
make preview script run | Preview |
invert preview conditional | Preview |
invert preview conditional |
add table preview to artifacts | Preview |
add table preview to artifacts |
fix preview hrefs | Preview |
fix preview hrefs |
update preview | Preview |
update preview |
base64 encode fonts | Preview |
base64 encode fonts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking good so far!
// We need to resolve to an absolute path so that this loader | ||
// can be applied to CSS in other projects (i.e. packages/core) | ||
loader: require.resolve("file-loader") + "?publicPath:/preview/dist/&name=./resources/[hash].[ext]" | ||
loader: require.resolve("base64-font-loader") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why? i've never had problems with file-loader
for fonts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the preview wasn't loading these resources, and i wasn't sure why, but i can revisit this.
@@ -41,6 +41,13 @@ const projects = [ | |||
copy: { | |||
"src/index.html": { to: [""], base: "src/" }, | |||
}, | |||
}, { | |||
id: "table", | |||
cwd: "packages/table", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trailing slash for consistency with other projects?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only docs has that slash, but i'll add it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh whatever then
|
||
## Developing | ||
|
||
Start a new feature branch. We use a format like `[category]/[short-name]`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm not sure this file is helpful here... it's in a non-standard place (should be in root) and these rules don't line up with our actual practices of [initials]/[short-name]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a lot of this content should probably go in the package README itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CONTRIBUTING.md is the right place to talk about our expectations wrt pull-requests, so this seems appropriate. However, I agree it should be consistent for the whole repo, so i can move it into the top.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes exactly we can have a root-level CONTRIBUTING to detail how to contribute to the whole thing. package-level notes can appear in each package's README.
can we bring back the |
... how/why are you getting blueprint-bot to commit for you? |
I registered the blueprint-bot user to my work email, which my local git is configured with as the author field. I just need to change blueprint-bot's email, but I'm not sure which addr to use. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got some questions but this looks good enough to merge.
just waiting for merge conflict resolution.
@@ -22,7 +22,7 @@ export interface ICellProps extends IIntentProps, IProps { | |||
|
|||
export type ICellRenderer = (rowIndex: number, columnIndex: number) => React.ReactElement<ICellProps>; | |||
|
|||
export const emptyCellRenderer = (rowIndex: number, columnIndex: number) => <Cell />; | |||
export const emptyCellRenderer = (_rowIndex: number, _columnIndex: number) => <Cell />; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
anything wrong with () => <Cell />
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really prefer to use the correct signature here.
@@ -70,7 +70,7 @@ export class EditableCell extends React.Component<IEditableCellProps, {}> { | |||
this.cellElement = ref; | |||
} | |||
|
|||
private handleCellDoubleClick = (event: MouseEvent) => { | |||
private handleCellDoubleClick = (_event: MouseEvent) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you just leave off these unused args? shouldn't affect typings; functions can always be implemented with fewer args.
@@ -14,7 +14,8 @@ | |||
}, | |||
"include": [ | |||
"typings/tsd.d.ts", | |||
"src/**/*" | |||
"src/**/*", | |||
"preview/*.d.ts" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style nit: i prefer putting .d.ts
files before sources
* Blueprint Table Blueprint Table is a highly configurable UI component that provides standard UX for presenting tabular data. It is built using [React](https://facebook.github.io/react/) but usable with any front end framework. **Features** - Fixed column headers and row indices columns - Resizable columns and rows - Double-click column resize handles for auto-sizing - Viewport-only rendering for scale (a.k.a. _lazy_ rendering) - Robust selections (columns, rows, or multiple cell regions) - Right-click to copy cell region contents - Inline editable column headers & cells - Unit test covered - Documented - Feature gallery
Blueprint Table is a highly configurable UI component that provides standard UX
for presenting tabular data. It is built using React but usable with any front end framework.
Features
Closes #8