Skip to content
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

DRAFT FEATURE: add information to dimensions menu #3597

Closed
wants to merge 1 commit into from

Conversation

MiauzGenau
Copy link

Related to: #3413

What I did
Show in the dimension menu, if a dimension already exists.
Add links to existing dimensions, to be able to open them in new browser tabs.

How I did it
getNodeByContextPath gives us a Node with otherNodeVariants attached.
With this information we can find out, which content dimensions already exist and display it in the menu.

For the URL building, I use the current contextPath and append the respective dimensions.

How to verify it
Look at dimension switcher on pages, where not all dimensions exist.

How it looks
Before:
(grey = disallowed)
Screenshot 2023-07-27 at 16 25 28

After:
(grey = does not exist, strike-through = disallowed)
Screenshot 2023-07-27 at 16 22 44

… link to make it possible to open it in a new browser tab

return mapValues(dimensionConfiguration.presets,
(presetConfiguration, presetName) => {
// if we do not know which dimensions exist, show all as existing
let existing = existingDimensions.length === 1 && existingDimensions[0] === undefined;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue: Sometimes we do not get the existing dimensions (?switching between dimensions with overlapping defined values)
What should be displayed in this case.? (does not feel right, to mix showing and not showing the information)

(currently if we do not get the existing dimensions, all get shown as existing (white text))

@Sebobo
Copy link
Member

Sebobo commented Aug 18, 2023

Does this feature replace the plugin https://github.com/Flowpack/Flowpack.NodeVariantSelector ?
If so, I would add some notes there and mark it deprecated.

@markusguenther
Copy link
Member

@pKallert is working on that topic to bring it to Version 8.4.
As Paula refactored the Code and talked to @MiauzGenau we can close this PR in favor of #3680

@MiauzGenau MiauzGenau deleted the dimension-menu-additions branch January 18, 2024 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants