Skip to content
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

Merged
merged 25 commits into from
Nov 9, 2016
Merged

Blueprint Table #30

merged 25 commits into from
Nov 9, 2016

Conversation

themadcreator
Copy link
Contributor

@themadcreator themadcreator commented Nov 2, 2016

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

  • 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

Closes #8

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
@giladgray
Copy link
Contributor

lint and test | Preview
core coverage | datetime coverage

@giladgray
Copy link
Contributor

make preview script run | Preview
core coverage | datetime coverage

@giladgray
Copy link
Contributor

invert preview conditional | Preview
core coverage | datetime coverage

@giladgray
Copy link
Contributor

invert preview conditional
feature gallery preview | perf preview | coverage

@giladgray
Copy link
Contributor

add table preview to artifacts | Preview
core coverage | datetime coverage

@giladgray
Copy link
Contributor

add table preview to artifacts
feature gallery preview | perf preview | coverage

@giladgray
Copy link
Contributor

fix preview hrefs | Preview
core coverage | datetime coverage

@giladgray
Copy link
Contributor

fix preview hrefs
feature gallery preview | perf preview | coverage

@giladgray
Copy link
Contributor

update preview | Preview
core coverage | datetime coverage

@giladgray
Copy link
Contributor

update preview
table preview

@giladgray
Copy link
Contributor

base64 encode fonts | Preview
core coverage | datetime coverage

@giladgray
Copy link
Contributor

base64 encode fonts
table preview

Copy link
Contributor

@giladgray giladgray left a 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")
Copy link
Contributor

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.

Copy link
Contributor Author

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",
Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor

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]`.
Copy link
Contributor

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]

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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.

@giladgray
Copy link
Contributor

can we bring back the Table (React) docs and examples?

@giladgray
Copy link
Contributor

fix docs table css

Preview: docs | landing | table
Coverage: core | datetime

@adidahiya
Copy link
Contributor

... how/why are you getting blueprint-bot to commit for you?

@themadcreator
Copy link
Contributor Author

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.

Copy link
Contributor

@giladgray giladgray left a 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 />;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

anything wrong with () => <Cell /> ?

Copy link
Contributor Author

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) => {
Copy link
Contributor

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"
Copy link
Contributor

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-bot
Copy link

lint

Preview: docs | table
Coverage: core | datetime

@blueprint-bot
Copy link

Merge branch 'master' of github.com:palantir/blueprint into project/table

Preview: docs | table
Coverage: core | datetime

@themadcreator themadcreator merged commit c39ae71 into master Nov 9, 2016
@themadcreator themadcreator deleted the project/table branch November 9, 2016 01:10
greglo pushed a commit to greglo/blueprint that referenced this pull request Dec 12, 2016
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants