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

Multi-level dropdowns #193

Closed
aparlato opened this issue Jul 8, 2024 · 0 comments · Fixed by #194
Closed

Multi-level dropdowns #193

aparlato opened this issue Jul 8, 2024 · 0 comments · Fixed by #194
Assignees

Comments

@aparlato
Copy link
Collaborator

aparlato commented Jul 8, 2024

Based on request from downstream client:

When you have too many style preset options, organization becomes difficult. We should allow for some way to clean this up.

While not my favorite UI pattern, my inclination is to go with a multi-level dropdown.

I'll have to dig in a bit to decide on the best syntax, but I'd like it to be backwards compatible.

Initial thoughts would be to update stylePresets and branchPatterns to accept a sublist type, but we'll see if this makes sense. In an ideal world we'd just allow an array inside the stylePresets array, but it will require a name.

const stylePresets = [
{
    id: 'mapbox-streets',
    name: 'Mapbox Streets',
    type: 'mapbox-gl',
    url: 'mapbox://styles/mapbox/streets-v11',
  },
  {
    name: 'Data viz styles',
    type: 'sublist',
    styles: [
      {
        id: 'mapbox-light',
        name: 'Mapbox Light',
        type: 'mapbox-gl',
        url: 'mapbox://styles/mapbox/light-v10',
      },
      {
          id: 'mapbox-dark',
          name: 'Mapbox Dark',
          type: 'mapbox-gl',
          url: 'mapbox://styles/mapbox/dark-v10',
        }
    ]
  },

]
@aparlato aparlato self-assigned this Jul 8, 2024
@aparlato aparlato mentioned this issue Jul 9, 2024
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant