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

fixed show/hide all #5475

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

Conversation

myspace20
Copy link

Fixes #5396

πŸ‘©πŸ»β€πŸ’» What does this PR do?

This adds the show or hide all logic to the data table custom column picker, reported in the detailed view of any outbound shipment. Previously, the hide/show all checkbox existed but the logic was unavailable.

πŸ’Œ Any notes for the reviewer?

πŸ§ͺ Testing

  • (e.g.) Central Sync server with 1 Legacy Desktop remote site and 1 OMS remote site running this PR
  • (e.g.) This sample datafile: google drive link
  • (e.g.) Open a requisition with some lines
  • (e.g.) Make a couple invoices supplying some amount of those lines
  • (e.g.) Review that "issued" column is the sum of the amount already issued in invoices for this requisition

πŸ“ƒ Documentation

  • Part of an epic: documentation will be completed for the feature as a whole
  • No documentation required: no user facing changes or a bug fix which isn't a change in behaviour
  • These areas should be updated or checked:
    1.
    2.

@github-actions github-actions bot added bug Something is borken good first issue Good for newcomers needs triage Severity: Normal Bugs which have an acceptable workaround. Moderate/tolerable user impact. Next minor release. labels Nov 19, 2024
@myspace20
Copy link
Author

@roxy-dao I need a review on this.

@roxy-dao roxy-dao added this to the v2.5.0 milestone Nov 20, 2024
@CarlosNZ CarlosNZ self-assigned this Nov 20, 2024
Copy link
Contributor

@CarlosNZ CarlosNZ left a comment

Choose a reason for hiding this comment

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

Hi, thanks for this, it's working as you intended.

However, I think the problem here is that it doesn't make sense to be able to turn off all columns.

Also, there is some additional confusion caused by the incorrect labelling of this originally -- it said "Select / unselect all columns", but what it actually did was toggle the column that should be labelled "Select / unselect all rows", which is what this column is used for in the actual tables.

I think the correct behaviour should be as follows:

  • The column label should be "Select / unselect all rows" (this only appears as a hover tool-tip on the table header, so makes sense in context)
  • In the column selection drop-down, this column (probably) should not be visible (i.e it's always on and we don't refer to it at all)
  • If (and only if) there is any columns hidden, then in the selection drop-down, there should be a button/link to "Restore all columns" which resets all columns to visible. Not sure about the UI design here, but it needs to be fairly unobtrusive and not clutter the UI (perhaps we need a mockup from @mariyamsupply before we go any further?)
  • There should be no option to hide all columns, it's purely a "restore" functionality.

Maybe wait till we get some design consensus on this before progressing further?

@mark-prins
Copy link
Collaborator

Thanks @CarlosNZ I think you've summarised the requirements nicely.
I was originally thinking to have a show/hide all columns option, but you're right, that hiding all columns makes little sense. It only helps if you want to show only a couple of columns. without the hide all option you have to manually hide each column which is pretty tedious.

Agree with the first two changes - and I think there's a valid case for having a show/hide all option. happy to go with that or the 'restore' option. That could just be a standard link style, but yeah, will leave that for @mariyamsupply

@mariyamsupply
Copy link
Contributor

Now that I understand that 'select/unselect' is the name for the checkbox, not the action, I think it's actually shouldn't be on the list.
the checkbox is a function for actions, not the data. I would vote for:

  • we have 'select/hide all columns',
  • we don't have the checkbox column on the list
  • if the last column (or all columns) are unselected we hide the column with check-boxes as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is borken good first issue Good for newcomers Severity: Normal Bugs which have an acceptable workaround. Moderate/tolerable user impact. Next minor release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show hide all columns doesn't
5 participants