-
Notifications
You must be signed in to change notification settings - Fork 16
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
IBX-9069: Initial Product Tab #1397
base: 4.6
Are you sure you want to change the base?
Conversation
f14fb1d
to
e36a086
Compare
const Translator = getTranslator(); | ||
const adminUiConfig = getAdminUiConfig(); | ||
const itemsComponentsMap = useMemo(() => { | ||
const { universalSelectItemsComponentsConfigs } = adminUiConfig.universalDiscoveryWidget; |
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.
Note: We already have selectedItemActions
config for selected locations, so I've chosen universalSelectItemsComponentsConfigs
, but I'm not happy with this name. Better name suggestions are welcome.
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.
I tried to come up with a proposal:
universalSelectionComponentsConfig - Barely shorter and not even sure if better
src/bundle/Resources/public/scss/ui/modules/universal-discovery/_collapsible.scss
Outdated
Show resolved
Hide resolved
} | ||
|
||
&__collapsible { | ||
& + #{$filterRowCssClass} { |
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.
couldn't we achieve it by setting some constant classname that would just need to be used in html?
Just looking for other solution, current one is probably ok, just looks strange for me (probably needs to get used to passing classname as variable)
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.
I guess you cannot generate a CSS selector based on the CSS variable set on the DOM element?
src/bundle/Resources/public/scss/ui/modules/universal-discovery/mixins/_filters-panel.scss
Outdated
Show resolved
Hide resolved
src/bundle/ui-dev/src/modules/universal-discovery/components/filters/filters.panel.js
Outdated
Show resolved
Hide resolved
src/bundle/ui-dev/src/modules/universal-discovery/components/filters/filters.row.js
Outdated
Show resolved
Hide resolved
...i-dev/src/modules/universal-discovery/components/selected-items/selected.items.panel.item.js
Outdated
Show resolved
Hide resolved
...dle/ui-dev/src/modules/universal-discovery/components/selected-items/selected.items.panel.js
Outdated
Show resolved
Hide resolved
src/bundle/ui-dev/src/modules/universal-discovery/components/sort-switcher/sort.switcher.js
Show resolved
Hide resolved
const isNotSelectable = | ||
(containersOnly && !isContainer) || (allowedContentTypes && !allowedContentTypes.includes(contentTypeIdentifier)); | ||
const isSelectionBlocked = multipleItemsLimit !== 0 && !isSelected && selectedLocations.length >= multipleItemsLimit; |
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.
you've created helper for it (src/bundle/ui-dev/src/modules/universal-discovery/helpers/selected.locations.helper.js
) couldn't you use it here, or difference is structure?
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.
Helpers from selected.locations.helper.js
use location
but in this component we have only access to location's id, which would be sufficient for selected.locations.helper.js
, but these helpers were designed with location parameter and I don't want to change it now, as this can result in BC.
src/bundle/ui-dev/src/modules/universal-discovery/hooks/usePaginableFetch.js
Show resolved
Hide resolved
src/bundle/Resources/public/scss/ui/modules/universal-discovery/_collapsible.scss
Show resolved
Hide resolved
d13fcb7
to
3ea8277
Compare
Quality Gate passedIssues Measures |
<div className="c-selected-items-panel__items-wrapper"> | ||
{renderActionBtns()} | ||
<div className="c-selected-items-panel__items-list"> | ||
{selectedItems.map((selectedItem) => { |
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.
I'm not sure which approach is more consistent with the overall design, but for me, the code is clearer if this logic would be moved to a separate function. What do you think about it?
Related PRs:
Description:
For QA:
Documentation: