-
Notifications
You must be signed in to change notification settings - Fork 4k
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: introduce children
function to shorthands
#4029
Merged
Merged
Conversation
This file contains 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
size-limit report
|
Codecov Report
@@ Coverage Diff @@
## master #4029 +/- ##
=======================================
Coverage 99.84% 99.84%
=======================================
Files 183 183
Lines 3280 3280
=======================================
Hits 3275 3275
Misses 5 5 Continue to review full report at Codecov.
|
…React into docs/deprecate-fn
layershifter
commented
Sep 9, 2020
Released in |
ichim-david
added a commit
to eea/volto-eea-website-theme
that referenced
this pull request
May 6, 2024
…on usage - Per the upgrade step we need to have an object with children see Semantic-Org/Semantic-UI-React#4029
ichim-david
added a commit
to eea/volto-eea-website-theme
that referenced
this pull request
May 23, 2024
…k rendering refs #161141 (#238) * Added back ObjectBrowserWidget.jsx from 17.x.x branch - before any changes to the anchor adding logic * style: Automated code fix * feat(teaser): modified ObjectBrowserWidget and UniversalLink to show links with hashes for manual links * change(draft-image): to remove image when published date is set to the future * change(draft-image): show draft image for items with publishing date in the future - this flips the return value of the previous commit after ticket feedback * feat(draft-image): added docstrings and unittests for checkIfPublished logic * fix(performance): Moved language selection logic to LanguageSwitcher.jsx - This way we don't have to use language selectors in Header.jsx if we are not using this feature which we are not on the EEA website * perf(header): lazy load LanguageSwitcher * fix(tests): load the loadable components within Header.test.jsx * fix(tests): Header.test.jsx after loadable introduction and key missing from TopicsWidget.test.jsx * fix(tests): several warnings due to bad test configuration * fix(tests): use render froim testing-library as react-testing-library is depreacated in favor of the previous * fix(tests): of header giving warning due to Dropdown text with function usage - Per the upgrade step we need to have an object with children see Semantic-Org/Semantic-UI-React#4029 * fix(perf): preload voltoCustom.css in order to avoid layout shift * Added Image.jsx from Volto 17.x.x before code changes * style: Automated code fix * fix(image): block default value selection for Image block size and align option * change(image): use only mini, preview and large scales for image rendering - unless the image is full-width from the align section in which case we use the huge scale * revert lazy loading of voltoCustom.css as it didn't properly parse it as stylesheet --------- Co-authored-by: eea-jenkins <eea-github@googlegroups.com>
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.
This PR adds support for
children
callback usage in any existing shorthands. This change was originally made for Stardust UI / Fluent UI Northstar (microsoft/fluent-ui-react#1951) which had the more complicated API.In case of Semantic UI React this will a soft migration to avoid any breaking changes: new API is added and the previous API becomes deprecated. It's expected to remove the old one with functions in V3.
💡 Motivation for changes
#1724 is discussing to add more types for options in
Dropdown
, the same issue can be met inMenu
. In Fluent UI Northstar these issues were solved withkind
prop:However, the current implantation with having shorthand as a function blocks it as there is no way to combine
{ kind: 'smth' }
and() => {}
🤔🔧 Actual changes
The API was introduced and docs were added, now if you would like to customize rendered elements please use
children
function on any shorthand:To avoid breaking changes in future releases please modify your existing usages:
The warning was added to inform users about them.
Please share feedback and concerns 👍