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

Button Group: By default the first button should be selected #2642

Open
2 tasks done
anwishaZ opened this issue Jun 25, 2024 · 2 comments · May be fixed by #2678
Open
2 tasks done

Button Group: By default the first button should be selected #2642

anwishaZ opened this issue Jun 25, 2024 · 2 comments · May be fixed by #2678
Assignees
Labels
external-request Bugs and features reported by individuals from other teams in Trimble

Comments

@anwishaZ
Copy link

anwishaZ commented Jun 25, 2024

Prerequisites

Proposal

This is how the first button should be selected by default on starting the application and then later the select can be changed onclick of other buttons.
buttongroup

Motivation and context

When the user opens the application, no button is selected by default. As a result, the user has to manually select a button each time they enter. To enhance the UI, it is better to have a default button selected. This way, the user can still choose to select other buttons if needed, but they won't have to make an initial selection every time they open the application.

What is the issue regarding ?

Modus Web Components Website (Storybook)

Priority

Medium

What product/project are you using Modus Components for ?

TRIMBLE FORESTRY

What is your team/division name ?

Central Product development

Are you willing to contribute ?

No

Are you using Modus Web Components in production ?

Yes

Copy link

Hello @anwishaZ! Thanks for opening an issue. The Modus core team will get back to you soon (usually within 24-hours) and provide guidance on how to proceed. Contributors are welcome to participate in the discussion and provide their input on how to best solve the issue, and even submit a PR if they want to.

Please wait until the issue is ready to be worked on before submitting a PR, or you can reach out to the core team if it is time bound. For trivial things, or bugs that don't change the expected behaviors and UI, you can go ahead and make a PR.

@github-actions github-actions bot added the external-request Bugs and features reported by individuals from other teams in Trimble label Jun 25, 2024
@coliff
Copy link
Member

coliff commented Jun 26, 2024

Hi @anwishaZ- the style guide needs to be updated. Button groups aren't just for toggle groups, they can also be used for a group of related buttons but not necessarily toggleable.

I understand that you'd like an option pre-selected for the 'single-selection' option (https://modus-web-components.trimble.com/?path=/docs/components-button-group--default#single-selection). I would suggest that this could be an option (opt-in), but not on by default. maybe something like:

<modus-button-group selection-type="single">
  <modus-button selected>Button 1</modus-button>
  <modus-button>Button 2</modus-button>
  <modus-button>Button 3</modus-button>
</modus-button-group>

@coliff coliff changed the title By default the first button from the buttongroup should be selected Button Group: By default the first button should be selected Jun 26, 2024
@ElishaSamPeterPrabhu ElishaSamPeterPrabhu self-assigned this Jul 4, 2024
@ElishaSamPeterPrabhu ElishaSamPeterPrabhu linked a pull request Jul 4, 2024 that will close this issue
13 tasks
@ElishaSamPeterPrabhu ElishaSamPeterPrabhu linked a pull request Jul 4, 2024 that will close this issue
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external-request Bugs and features reported by individuals from other teams in Trimble
Projects
Status: PR Review
Development

Successfully merging a pull request may close this issue.

3 participants