Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@sg00dwin
Copy link
Contributor

@sg00dwin sg00dwin commented Jun 26, 2025

@patternfly-build
Copy link
Collaborator

patternfly-build commented Jun 26, 2025

Copy link
Member

@srambach srambach left a comment

Choose a reason for hiding this comment

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

These changes look good to me. A couple of notes -

  • @mcoker does this qualify as a breaking change? We've added pf-v6-c-button and pf-m-plain which I think would be ok? But also removed pf-v6-c-data-list__item-draggable-icon
  • if removing pf-v6-c-data-list__item-draggable-icon is ok, then I think we can remove the styling for it (just icon color) and remove it from the docs. Otherwise, I guess we need to add that back onto the icon span?

Copy link
Contributor

@mcoker mcoker left a comment

Choose a reason for hiding this comment

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

Looks good, just a couple of updates please. I left a comment about removing the disabled attribute from an hbs block - we should also replace disabled with data-list-item-draggable-button--IsDisabled=true on this line, too

{{> data-list-item-draggable-button data-list-item-draggable-button--attribute=(concat 'id="' data-list--id '-draggable-button-3" aria-describedby="draggable-help" aria-labelledby="' data-list--id '-draggable-button-3 ' data-list--id '-item-3" disabled')}}

Will answer @srambach's comments in another comment

button--IsBlock='pf-m-block'
button--IsSettings='pf-m-settings'
button--IsHamburger='pf-m-hamburger'
button--IsDraggable='pf-v6-c-data-list__item-draggable-button'
Copy link
Contributor

Choose a reason for hiding this comment

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

This this is a class specific to data-list, can you take this out and move it to data-list-item-draggable-button?

I would just remove this line, then in data-list-item-draggable-button.hbs, just pass button--modifier=(concat pfv "data-list__item-draggable-button"). My concat syntax may be wrong 😅 Just want to get the hard-coded pf-v6-c- part out of the string.

{{#> data-list-item-row}}
{{#> data-list-item-control}}
{{> data-list-item-draggable-button data-list-item-draggable-button--modifier="pf-m-disabled" data-list-item-draggable-button--attribute=(concat 'id="' data-list--id '-draggable-button-1" aria-describedby="draggable-help" aria-labelledby="' data-list--id '-draggable-button-1 ' data-list--id '-item-1" disabled')}}
{{> data-list-item-draggable-button data-list-item-draggable-button--IsDisabled=true data-list-item-draggable-button--attribute=(concat 'id="' data-list--id '-draggable-button-1" aria-describedby="draggable-help" aria-labelledby="' data-list--id '-draggable-button-1 ' data-list--id '-item-1" disabled')}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
{{> data-list-item-draggable-button data-list-item-draggable-button--IsDisabled=true data-list-item-draggable-button--attribute=(concat 'id="' data-list--id '-draggable-button-1" aria-describedby="draggable-help" aria-labelledby="' data-list--id '-draggable-button-1 ' data-list--id '-item-1" disabled')}}
{{> data-list-item-draggable-button data-list-item-draggable-button--IsDisabled=true data-list-item-draggable-button--attribute=(concat 'id="' data-list--id '-draggable-button-1" aria-describedby="draggable-help" aria-labelledby="' data-list--id '-draggable-button-1 ' data-list--id '-item-1"')}}

Just a nit, but you can remove the disabled attr here now that you're passing button--IsDisabled to the button. That will add the disabled attr

{{#if button--IsDisabled}}
{{#unless (concat button--type button--IsSpan button--IsAnchor)}}
disabled
{{/unless}}
{{/if}}

@mcoker
Copy link
Contributor

mcoker commented Jun 27, 2025

@srambach good catches!

@mcoker does this qualify as a breaking change? We've added pf-v6-c-button and pf-m-plain which I think would be ok? But also removed pf-v6-c-data-list__item-draggable-icon

The button classes are in the react component, so IMO that part of the update just fixes a bug in the core docs and shouldn't be breaking. However we do need to add .pf-v6-c-data-list__item-draggable-icon back to match the react component. And I think we should remove the styles that set the icon color, too, and just use the button's icon colors. Though we'll want to leave the vars in place, so if a user has set them, they'll continue to work as they did before.

I think that update would be this:

if removing pf-v6-c-data-list__item-draggable-icon is ok, then I think we can remove the styling for it (just icon color) and remove it from the docs. Otherwise, I guess we need to add that back onto the icon span?

Yep! Need to add it back.

@sg00dwin
Copy link
Contributor Author

@mcoker Addressed comments

  • add data-list-item-draggable-icon back
  • remove/replace disabled attributes in .md
  • move class from button to draggable-button as a button--modifier
  • remove the styles that set the icon color and just use the button's icon colors

@github-actions
Copy link

This PR has been automatically marked as stale because it has not had activity in the last 60 days.

@github-actions github-actions bot added the Stale label Sep 11, 2025
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.

Bug - data-list - compact button for draggable element isn't spaced correctly

4 participants