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

FEATURE: Allow grouping in DimensionSwitcher #3670

Merged
merged 2 commits into from
Dec 20, 2023

Conversation

JamesAlias
Copy link
Contributor

@JamesAlias JamesAlias commented Dec 5, 2023

What I did
If (and only if) a Neos.ContentRepository.contentDimensions.[...].presets preset contains a group then the DimensionSwitcher dropdown is grouped.

Example:

Neos:
  ContentRepository:
    contentDimensions:
      language:
        label: 'Language'
        icon: icon-language
        default: en_UK
        defaultPreset: en_UK
        presets:
          en_UK:
            label: 'English (UK)'
            values:
              - en_UK
            uriSegment: uk
            group: NON-EU
          de:
            label: German
            values:
              - de
            uriSegment: de
            group: EU

How I did it
I additionally map the group field when transforming language presets to select box options.

How to verify it
Wrote a test for it.

Add groups to language presets and open the DimensionSwitcher.

Screenshot 2023-12-05 at 1 29 04 PM

@JamesAlias JamesAlias requested a review from skurfuerst December 5, 2023 12:29
@JamesAlias JamesAlias added the 8.3 label Dec 5, 2023
@JamesAlias JamesAlias self-assigned this Dec 5, 2023
@github-actions github-actions bot added the Feature Label to mark the change as feature label Dec 5, 2023
@markusguenther
Copy link
Member

As it is a feature we need to target Neos 9.0 here, or we need to discuss a potential 8.4 version. Did talk about that already at the hamburg sprint.

But ATM it would target 9.0. Like the feature, btw. ;)

@JamesAlias
Copy link
Contributor Author

JamesAlias commented Dec 5, 2023

As it is a feature we need to target Neos 9.0 here, or we need to discuss a potential 8.4 version. Did talk about that already at the hamburg sprint.

But ATM it would target 9.0. Like the feature, btw. ;)

I wasn't sure which version to target, but we need it in Neos 8.x for a customer 🙈
It is a feature, but I could mark it as patch 😅

8.4 would make sense as well as upgrading to 9.x would be a big step for most afaik.

@skurfuerst
Copy link
Member

@markusguenther hey, we need this for a customer on 8.3 which we won't update too soon. So it would be really good to have this landing on an 8.x branch, as otherwise we need to patch forever... and I think the feature has little risk :)

All the best, Sebastian

@markusguenther
Copy link
Member

By the way, I wrote a short proposal on Discuss to getting the feature out the door without tricking SemVer.
https://discuss.neos.io/t/feedback-wanted-for-neos-ui-features/6466

@markusguenther markusguenther force-pushed the feature/allow-grouping-in-dimension-switcher branch from a575e47 to dcc2a45 Compare December 16, 2023 11:37
@markusguenther markusguenther changed the base branch from 8.3 to 8.4 December 16, 2023 11:37
@github-actions github-actions bot added 8.4 and removed 8.3 labels Dec 16, 2023
Copy link
Member

@markusguenther markusguenther left a comment

Choose a reason for hiding this comment

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

Thanks for the nice improvement. The failing end-to-end test is also broken in the 8.3 and 8.4 branches. For some reason in 8.2 and 9.0 it works and locally it works also.

@markusguenther markusguenther force-pushed the feature/allow-grouping-in-dimension-switcher branch from dcc2a45 to 97eaf40 Compare December 16, 2023 19:43
@markusguenther
Copy link
Member

Ok, acceptance tests now also work :)

Copy link
Member

@Sebobo Sebobo left a comment

Choose a reason for hiding this comment

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

Fine by reading

@markusguenther markusguenther merged commit 5cb3978 into 8.4 Dec 20, 2023
3 checks passed
@markusguenther markusguenther deleted the feature/allow-grouping-in-dimension-switcher branch December 20, 2023 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.4 Feature Label to mark the change as feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants