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

Refine tabbed-dialog prototype and define component composition #1160

Merged
merged 1 commit into from
Jul 20, 2023

Conversation

lyzadanger
Copy link
Contributor

@lyzadanger lyzadanger commented Jul 20, 2023

This PR extends the import/export project's tabbed-dialog prototype page and starts coalescing the composition of components. It also adjusts tab sequence/navigation in a way that might address #1158 without the need for extra work.

The prototype is still loose, but these constituent components are bubbling up:

  • TabListHeader: Bakes the design pattern layout of a horizontal set of tabs at the top of a panel/card
  • TabPanel: At present, combines both the design pattern of tab-panel content within a card/panel and some a11y details.
  • CloseButton: Proposed, a styled button that I'd like to make context-aware for its click handler.
  • Divider: Ultra-simple component, cribbed from MUI, that I'd like to use in place of border-underlines and whatnot in components in the future.

The needed changes to Dialog are also solidifying:

  • variant prop, default to panel (supports current usage) with a custom option (so that Dialog is not concerned with the presentation of its contents). Inelegant, but seems to allow us what we need to do here without breaking the current API. The long-term direction would be to migrate usage to custom across apps and then get rid of variant. Still percolating on this.
  • Proposed: Add a new CloseableContext or similar that could be used by Dialog and potentially other components that can be "closed". Put a close handler (that takes transitions into account as needed) into this context. Context-aware things such as the proposed CloseButton could take this into account.

This PR doesn't need deep review (beyond what the reviewer would like to review), as it's still all prototype.

Next steps: Start building extracted components, update Dialog.

Part of #1141

Generalize the import/export UI prototype's tabbed-dialog pattern and
loosely define the constituent components within the prototype page
component.
Copy link
Contributor

@acelaya acelaya left a comment

Choose a reason for hiding this comment

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

I think your thoughts and considerations make sense in general.

@lyzadanger lyzadanger merged commit 3f36591 into main Jul 20, 2023
@lyzadanger lyzadanger deleted the decompose-tab-dialog branch July 20, 2023 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants