-
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-7030: [UDW] Inactive edit button in grid view #1175
Conversation
d2a0770
to
9f5dc7e
Compare
9f5dc7e
to
52d8f58
Compare
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.
28794d0
to
ee1e821
Compare
import { getTranslator } from '@ibexa-admin-ui/src/bundle/Resources/public/js/scripts/helpers/context.helper'; | ||
|
||
const getLoadedLocationsLimitedMap = (loadedLocationsFullMap, activeLocationId) => { |
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.
Why is it placed outside of the component? 🤔
const getLoadedLocationsLimitedMap = (loadedLocationsFullMap, activeLocationId) => { | ||
const itemIndex = loadedLocationsFullMap.findIndex(({ parentLocationId }) => parentLocationId === activeLocationId); | ||
|
||
return loadedLocationsFullMap.slice(0, itemIndex + 1); |
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.
Shouldn't we check whether itemIndex
is different from -1
?
db58d01
to
da117be
Compare
Quality Gate passedIssues Measures |
v4.6
For whole UDW markedLocationId is used as both item that is detailed in sidebar and parent of last/active branch.
It changes however in grid view, where markedLocationId keeps data about details in sidebar, but it's not necessary parent of visible items, therefore I've added extra state variable
gridActiveLocationId
that is used only in grid view and keeps info about parent of visible subitems.At first I wanted to keep it only in GridView component, but I had to move it to the top, as entering CotF destroyes everything except top layer, so state for activeLocationId was lost as well and we need this info after closing CotF.
Checklist:
@ibexa/engineering
).