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

restore old ExpandableBlock api #1502

Merged
merged 13 commits into from
Aug 22, 2023
Merged

restore old ExpandableBlock api #1502

merged 13 commits into from
Aug 22, 2023

Conversation

mayank99
Copy link
Contributor

@mayank99 mayank99 commented Aug 16, 2023

Changes

undid the breaking change from #1354 and brought back title/caption/endIcon props while also supporting the new subcomponents added in that PR.

renamed ExpandableBlock.Header to ExpandableBlock.Trigger as it makes more sense.

these two snippets are now equivalent:

<ExpandableBlock title='click me' caption='or not' endIcon={<svg>...</svg>}>
  content in block
</ExpandableBlock>
<ExpandableBlock.Wrapper>
  <ExpandableBlock.Trigger>
    <ExpandableBlock.ExpandIcon />
    <ExpandableBlock.LabelArea>
      <ExpandableBlock.Title>click me</ExpandableBlock.Title>
      <ExpandableBlock.Caption>or not</ExpandableBlock.Caption>
    </ExpandableBlock.LabelArea>
    <ExpandableBlock.EndIcon><svg>...</svg></ExpandableBlock.EndIcon>
  </ExpandableBlock.Trigger>
  <ExpandableBlock.Content>content in block</ExpandableBlock.Content>
</ExpandableBlock.Wrapper>

Testing

updated one story and added one unit test.

Docs

updated old changeset. updated documentation page.

will update migration guide too.

@mayank99 mayank99 added this to the React 3.0 milestone Aug 16, 2023
@mayank99 mayank99 self-assigned this Aug 16, 2023
@mayank99 mayank99 mentioned this pull request Aug 16, 2023
24 tasks
@mayank99 mayank99 changed the title bring back old ExpandableBlock api restore old ExpandableBlock api Aug 16, 2023
@mayank99 mayank99 marked this pull request as ready for review August 16, 2023 20:54
@mayank99 mayank99 requested review from a team as code owners August 16, 2023 20:54
@mayank99 mayank99 requested review from gretanausedaite and r100-stack and removed request for a team August 16, 2023 20:54
Copy link
Member

@r100-stack r100-stack left a comment

Choose a reason for hiding this comment

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

Having some website examples that still use the old API would be good.

@mayank99
Copy link
Contributor Author

mayank99 commented Aug 21, 2023

Having some website examples that still use the old API would be good.

Updated. 3e65703

@mayank99 mayank99 force-pushed the mayank/expandableblock-api branch from 4bcfa7e to bf00897 Compare August 21, 2023 19:56
@mayank99 mayank99 force-pushed the mayank/expandableblock-api branch from bf00897 to 3e65703 Compare August 21, 2023 19:56
@mayank99 mayank99 merged commit c03cef9 into dev Aug 22, 2023
@mayank99 mayank99 deleted the mayank/expandableblock-api branch August 22, 2023 13:25
@mayank99 mayank99 mentioned this pull request Aug 22, 2023
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.

3 participants