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

[table] feat: ColumnHeaderCell2, TruncatedFormat2, JSONFormat2 #5481

Merged
merged 11 commits into from
Aug 4, 2022

Conversation

adidahiya
Copy link
Contributor

@adidahiya adidahiya commented Aug 4, 2022

Fixes #5480

Changes proposed in this pull request:

  • Create ColumnHeaderCell2, TruncatedFormat2, and JSONFormat2 components which use Popover2 instead of Popover
  • Deprecate ColumnHeaderCell, TruncatedFormat, and JSONFormat components
  • Import blueprint-popover2.css in table-dev-app, add documentation for this new requirement

This PR also fixes an undocumented issue in the table "Formatting" example where the cell truncation was not being detected, and thus the overflow popover was never shown. It's now fixed with detectTruncation={true}:

image

Reviewers should focus on:

Minor breaking change in table, requiring users to import blueprint-popover2.css. We expect most consumers to be using @blueprintjs/popover2 already at this point, so this should not be too much of a burden (likely a no-op).

We're avoiding the breaking change by splitting these out into new components. Consumers of the new components will need to add the CSS import when they migrate.

Screenshot

ColumnHeaderCell2

image

TruncatedFormat2

image

@blueprint-bot
Copy link

[table] feat(ColumnHeaderCell, TruncatedFormat): use Popover2

Previews: documentation | landing | table | demo

@blueprint-bot
Copy link

fix tests

Previews: documentation | landing | table | demo

@blueprint-bot
Copy link

Merge remote-tracking branch 'origin/develop' into ad/table-v2-components

Previews: documentation | landing | table | demo

@adidahiya
Copy link
Contributor Author

adidahiya commented Aug 4, 2022

Changed my mind -- I think we should split these out into new v2 components, as the breaking change is not worth it. If we make the change directly to ColumnHeaderCell and TruncatedFormat, then some consumers who have not migrated to Popover2 yet will get broken column header menus immediately after this upgrade, and that feel unnecessary.

@blueprint-bot
Copy link

refactor into v2 components

Previews: documentation | landing | table | demo

@blueprint-bot
Copy link

more migrations, docs updates

Previews: documentation | landing | table | demo

@adidahiya adidahiya changed the title [table] feat(ColumnHeaderCell, TruncatedFormat): use Popover2 [table] feat: ColumnHeaderCell2, TruncatedFormat2, JSONFormat2 Aug 4, 2022
@blueprint-bot
Copy link

commit missing files

Previews: documentation | landing | table | demo

@blueprint-bot
Copy link

update docs, fix formatting example to detect truncation

Previews: documentation | landing | table | demo

@adidahiya adidahiya merged commit 2a0fcf7 into develop Aug 4, 2022
@adidahiya adidahiya deleted the ad/table-v2-components branch August 5, 2022 15:22
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.

@blueprintjs/table TruncatedFormat and ColumnHeaderCell still use Popover
2 participants