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

ListWidget: Fix sliding of action column to right in tables which are using ListWidget. #30525

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

opmkumar
Copy link
Collaborator

@opmkumar opmkumar commented Jun 21, 2024

This pr fixes the issue of sliding of action column of the tables which are using ListWidget to the extreme right when the table is empty. In total 5 such tables were showing this effect and those have been fixed in this issue.

Fixes: #29633

Screenshots and screen captures:

Deactivated user table:

deactivated.users.table.mp4

Invitations table:

Invitations table

linkifiers table:

linkifiers table

default channel table:

default channel table

uploaded files table:

uploaded files table

Self-review checklist
  • Self-reviewed the changes for clarity and maintainability
    (variable names, code reuse, readability, etc.).

Communicate decisions, questions, and potential concerns.

  • Explains differences from previous plans (e.g., issue description).
  • Highlights technical choices and bugs encountered.
  • Calls out remaining decisions and concerns.
  • Automated tests verify logic where appropriate.

Individual commits are ready for review (see commit discipline).

  • Each commit is a coherent idea.
  • Commit message(s) explain reasoning and motivation for changes.

Completed manual review and testing of the following:

  • Visual appearance of the changes.
  • Responsiveness and internationalization.
  • Strings and tooltips.
  • End-to-end functionality of buttons, interactions and flows.
  • Corner cases, error conditions, and easily imagined bugs.

@zulipbot
Copy link
Member

Hello @zulip/server-settings members, this pull request was labeled with the "area: settings UI" label, so you may want to check it out!

@opmkumar opmkumar force-pushed the fix/Action-column-sliding-to-right branch 2 times, most recently from c75ae07 to fd80761 Compare June 21, 2024 20:53
@opmkumar opmkumar changed the title Fix/action column sliding to right ListWidget: Fix sliding of action column to right in tables which are using ListWidget. Jun 21, 2024
@opmkumar opmkumar force-pushed the fix/Action-column-sliding-to-right branch from fd80761 to 3b19d80 Compare June 22, 2024 10:40
@zulipbot zulipbot added size: XL and removed size: L labels Jun 22, 2024
@opmkumar opmkumar force-pushed the fix/Action-column-sliding-to-right branch from 3b19d80 to d4ecdc2 Compare June 23, 2024 09:19
@amanagr
Copy link
Member

amanagr commented Jun 23, 2024

That's a lot of changes for this issue. What are your thoughts on setting a min-width for the action column which just ensure the action buttons for the table are visible?

If we really need these changes to fix the issue, it might not be worth fixing it.

@opmkumar
Copy link
Collaborator Author

What are your thoughts on setting a min-width for the action column which just ensure the action buttons for the table are visible?

I dont really think that it would be a good option.
All the tables which are using the ListWidget dont have same action buttons in size.

For eg. :
For deactivated users:

image

For default channel stream:

image

So it wont really be possible to find a min-width which would work for all the tables consistently according to me.

I think for ui consistency, the action column was set to width: 1% so that it would consume the minimum width possible which would make the table seems more natural and good looking. But if we really want to solve this problem of sliding of action column with minimum efforts then it would be best to just change the width from 1% to width: auto irrespective of whether a table is empty or not.

Do let me know what you think about the above approach. Apart from this, I wasnt really able to think of any other solution to solve the above issue more easily.

@amanagr
Copy link
Member

amanagr commented Jun 24, 2024

I think we want a solution that doesn't use JS and doesn't change the header width when the table is empty otherwise the current behaviour is as good as this behaviour.

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

Successfully merging this pull request may close these issues.

ListWidget: Lack of margin on the right when there are no rows on the table
3 participants