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

DBTag [removeable]: includes a lot of unused/not displayed DOM from DBCheckbox #2678

Closed
1 of 7 tasks
annsch opened this issue May 24, 2024 · 2 comments · Fixed by #2686
Closed
1 of 7 tasks

DBTag [removeable]: includes a lot of unused/not displayed DOM from DBCheckbox #2678

annsch opened this issue May 24, 2024 · 2 comments · Fixed by #2686
Labels
🐛bug Something isn't working 🏘components Changes inside components folder 🍄🆙improvement New feature or request

Comments

@annsch
Copy link
Collaborator

annsch commented May 24, 2024

Which generators are impacted?

  • All
  • HTML
  • React
  • Angular
  • Vue
  • Web components
  • Power Apps

Reproduction case

Currently DB Tag with prop "removeable" also includes a lot of not displayed HTML Code generated by checkboxes' validation () – is this really necessary?

<div class="db-tag" data-semantic="successful" data-icon="plus">
     <div class="db-checkbox">
           <label for="checkbox">
                <input type="checkbox">
                Label-Text
           </label>
         <span id="checkbox-valid-message" class="db-infotext" data-semantic="successful" data-size="small">TODO: Add a validMessage</span>
         <span id="checkbox-invalid-message" class="db-infotext" data-semantic="critical" data-size="small">TODO: Add an invalidMessage</span>
    </div>
</div>

Expected Behaviour

When using DB Tag with removeable option, a lighter version of DBCheckbox should be rendered

Screenshots

No response

Browser version

None

Add any other context about the problem here.

No response

@annsch annsch added 🍄🆙improvement New feature or request 🏘components Changes inside components folder labels May 24, 2024
@nmerget nmerget added the 🐛bug Something isn't working label May 24, 2024
@nmerget
Copy link
Member

nmerget commented May 24, 2024

You should be able to do something like this as well:

<DBTag>
   <label>
	<input type="checkbox" />
    Test
    </label>
</DBTag>

We need to fix this. DBTag should be just styling.

Maybe we could consider if we want to remove the additional span via JS. What do you think @mfranzke?

@mfranzke
Copy link
Member

mfranzke commented May 24, 2024

You should be able to do something like this as well:

<DBTag>
   <label>
	<input type="checkbox" />
    Test
    </label>
</DBTag>

We need to fix this. DBTag should be just styling.

Maybe we could consider if we want to remove the additional span via JS. What do you think @mfranzke?

this sounds a little fragile to me. Additionally we would manipulate what the users have inserted and probably intended differently in here.
What about not using DBCheckbox in the firstplace, but only provide documentation for the construct that you suggested?

<label>
	<input type="checkbox" />
    Test
    </label>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛bug Something isn't working 🏘components Changes inside components folder 🍄🆙improvement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants