-
Notifications
You must be signed in to change notification settings - Fork 604
Introduce Save and close on SelectPanel #5956
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
Conversation
🦋 Changeset detectedLatest commit: 876aaa0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
Pull Request Overview
This pull request introduces a "Save and close" functionality on the SelectPanel by deprecating the footer prop and adding the secondaryAction prop. Key changes include:
- Replacing the footer prop with secondaryAction and deprecating the former.
- Updating button rendering logic to support the new "Save and close" experience.
- Adjusting test IDs and related story names to reflect the new changes.
Reviewed Changes
Copilot reviewed 27 out of 29 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
script/generate-e2e-tests.js | Updated test ID for the SelectPanel secondary action. |
packages/react/src/SelectPanel/SelectPanel.tsx | Added secondaryAction prop with related UI logic. |
packages/react/src/SelectPanel/SelectPanel.features.stories.tsx | Renamed story from WithFooter to WithSecondaryAction. |
packages/react/src/SelectPanel/SelectPanel.dev.stories.tsx | Updated demonstration of the new secondaryAction usage. |
e2e/components/SelectPanel.test.ts | Adjusted E2E test for new test ID. |
.changeset/*.md | Updated changesets reflecting the new behavior. |
Files not reviewed (2)
- packages/react/src/SelectPanel/SelectPanel.docs.json: Language not supported
- packages/react/src/SelectPanel/SelectPanel.module.css: Language not supported
Comments suppressed due to low confidence (1)
script/generate-e2e-tests.js:1125
- Test id updated to 'with-secondary-action' while the display name remains 'With Footer'. Consider updating the display name to 'With Secondary Action' to ensure consistency.
id: 'components-selectpanel-features--with-secondary-action',
9972ffb
to
2a3cf4c
Compare
👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks! |
2a3cf4c
to
b43cee3
Compare
size-limit report 📦
|
91951fa
to
4eb8424
Compare
1a0ea9d
to
876aaa0
Compare
Uh oh! @hectahertz, at least one image you shared is missing helpful alt text. Check your pull request body to fix the following violations:
Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image. Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.
|
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.
❇️
Closes https://github.com/github/primer/issues/4894
Changelog
Changed
Changes the
Save
button in the specific scenario described in the issue to beSave and close
.After discussing with @emilybrick and @francinelucca we resolved this was the easiest approach that is user friendly and doesn't complicate the existing logic further.
This specific case should disappear anyway as soon as the
onCancel
prop is required on the next breaking release.Rollout strategy
Testing & Reviewing
Merge checklist