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

Do not add the "Show/hide row weights" link in empty tables #5195

Open
klonos opened this issue Sep 2, 2021 · 3 comments
Open

Do not add the "Show/hide row weights" link in empty tables #5195

klonos opened this issue Sep 2, 2021 · 3 comments
Assignees

Comments

@klonos
Copy link
Member

klonos commented Sep 2, 2021

Not sure if this is wide-spread, or limited to the vocabulary term listing page, but here's steps to reproduce that:

  1. In a vanilla Backdrop installation, visit admin/structure/taxonomy/tags

  2. On an existing site, with terms already added to existing vocabularies, create a new vocabulary

    image

  3. Click the "Show/hide row weights" link, and notice that nothing happens to the "Weight" column.

@klonos klonos self-assigned this Sep 2, 2021
@indigoxela
Copy link
Member

Well, there's no row, so nothing can have a row weight, right. 😉 IMO this works as designed.

What would you expect?

@klonos
Copy link
Member Author

klonos commented Sep 2, 2021

The same show/hide toggle in tables that have rows shows/hides:

  • the drag handle
  • the entire "Weight" column

In this table (and other empty ones I'm assuming) clicking this toggle link does absolutely nothing. So if there are no rows, then there is no point for the show/hide behavior to be attached, nor for the toggle to be there. I would even go as far as to say that the weight column should not be shown either.

@indigoxela
Copy link
Member

BTW - there is a bug, but it's not the toggle link, it's the weight column that's visible all the time, not only when the toggle link got clicked. Not sure, when that regressed, I suspect, it's also caused by #3402

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants