-
Notifications
You must be signed in to change notification settings - Fork 129
Custom section paddings #2340
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
Merged
Merged
Custom section paddings #2340
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
558c05a to
a7641cf
Compare
A callable can be passed to base defaults on options set by theme. REDMINE-21191
Can be used to use different default section padding per appearance. REDMINE-21191
REDMINE-21191
9d4328b to
3b72c26
Compare
Apply theme default padding to foreground to replace removed box margins. Also move indicators to prevent padding indcator from being hidden behind navigation. REDMINE-21191
Ensure padding can be forced to make room for the insert element button even when custom padding is set. REDMINE-21191
REDMINE-21191
When the motif area is exposed, the Foreground component now suppresses its top padding to avoid double spacing. This ensures consistent visual appearance when the backdrop motif area is configured to push content down. REDMINE-21191
REDMINE-21191
Only if portrait asset is present and opt-out has not been set. REDMINE-21191
Force initialization of the I18n backend before tests run so that translations from locale files are loaded first. Fake translations set via the translation helper then override those defaults instead of being overwritten when I18n.t triggers lazy loading. REDMINE-21191
Make defaults match previously hard-coded paddings for different appearance options. REDMINE-21191
Section padding should exclusively control spacing above the first content element. This removes the content element's own top margin when it's at the start of a section (shadow/transparent appearance). Cards appearance keeps the margin since elements are inside the card and section padding is outside. REDMINE-21191
Content elements like textBlock and question have internal top margins that extend beyond the default 1em content element margin. This allows content elements to specify their preferred top margin via the new defaultMarginTop option, enabling these custom margins to also be trimmed at the beginning of sections where section padding should control spacing exclusively. REDMINE-21191
When the motif area is exposed and content is padded down, the first content element box should keep its top margin rather than suppressing it. The space above comes from the motif area padding, not a manually configured section padding. Keep existing spacing between motif and box. REDMINE-21191
Verifies that box wrappers update their margin when isContentPadded changes dynamically. This required fixing the Layout memo comparison to include isContentPadded, and enhancing the useMotifAreaState mock to support triggering re-renders. Extracts margin suppression styles to a shared CSS module for easier testing across different box wrapper implementations. REDMINE-21191
Used to collapse with box margin. REDMINE-21191
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
REDMINE-21191