-
Notifications
You must be signed in to change notification settings - Fork 76
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
feat: Create close subform button component #13947
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #13947 +/- ##
==========================================
+ Coverage 95.21% 95.23% +0.01%
==========================================
Files 1713 1711 -2
Lines 22586 22579 -7
Branches 2641 2642 +1
==========================================
- Hits 21506 21503 -3
Misses 834 834
+ Partials 246 242 -4 ☔ View full report in Codecov by Sentry. |
Note: Codecov reports missing coverage in 3 files, but these issues were introduced from merging with main and are not related to changes in 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.
Good question! The other buttons that handle different tasks also share this common icon and are differentiated by their name. So, I think we could keep the icon as it is for now. This might be something we revisit later, and I’ll leave it open for @Annikenkbrathen to consider on a later stage. |
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.
Nice work!
Yes, just go ahead and use that icon. It’s the one we have on all buttons so far, so we’ll use it until we decide to make any changes to all the buttons. |
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.
Tested and works perfectly ✅
Description
This PR introduces
closeSubformButton
as a visual variant ofcustomButton
in studio. While it’s saved ascustomButton
type,closeSubformButton
appears distinct in Studio due to its action configuration:This configuration allows
closeSubformButton
to function as a unique component visually while maintaining customButton’s base structure. The validation can be adjusted, buttype
andid
are required to differentiate it.I also refactored functions and hooks into a single new hook,
useComponentTitle
, which now handles component naming across both internal (toolbar) and external (backend-rendered / DesignView) components, managing type names and text resources together.closesubformbutton-drag-drop.mp4
Related Issue(s)
CloseSubformButton
component #13843Verification
Documentation