Skip to content

mgr/dashboard: unselect rows in datatables#45313

Merged
epuertat merged 1 commit intoceph:masterfrom
rhcs-dashboard:unselect-datatable-row
May 17, 2022
Merged

mgr/dashboard: unselect rows in datatables#45313
epuertat merged 1 commit intoceph:masterfrom
rhcs-dashboard:unselect-datatable-row

Conversation

@Sarthak0702
Copy link
Member

@Sarthak0702 Sarthak0702 commented Mar 9, 2022

User should be able to unselect a selected row in data-tables.
referred from: swimlane/ngx-datatable#775 (comment)

Fixes: https://tracker.ceph.com/issues/53244, https://tracker.ceph.com/issues/54575
Signed-off-by: Sarthak0702 sarthak.0702@gmail.com

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows

@Sarthak0702 Sarthak0702 requested a review from a team as a code owner March 9, 2022 12:18
@Sarthak0702 Sarthak0702 requested review from avanthakkar and pereman2 and removed request for a team March 9, 2022 12:18
Copy link
Member

@nizamial09 nizamial09 left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @Sarthak0702

@nizamial09
Copy link
Member

Is it possible to verify this in a small unit test? @Sarthak0702

Copy link
Contributor

@pereman2 pereman2 left a comment

Choose a reason for hiding this comment

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

Great, thanks!

@Sarthak0702
Copy link
Member Author

Is it possible to verify this in a small unit test? @Sarthak0702

Thats a good idea, will try to add that.

@Sarthak0702
Copy link
Member Author

jenkins test windows

@Sarthak0702
Copy link
Member Author

jenkins test make check

@epuertat epuertat added the DNM label Mar 16, 2022
@Sarthak0702
Copy link
Member Author

This fix breaks the multi select functionality in data-tables (Cluster-> OSDs ). Need to investigate this.

@Sarthak0702 Sarthak0702 force-pushed the unselect-datatable-row branch 2 times, most recently from 1287083 to cfbf9a3 Compare March 18, 2022 20:14
@Sarthak0702
Copy link
Member Author

This fix breaks the multi select functionality in data-tables (Cluster-> OSDs ). Need to investigate this.

Fixed. As unselect functionality is natively supported by ngx-datatables for 'multiclick' & 'multi', selectCheck is only added for 'single' selectionType.

@Sarthak0702 Sarthak0702 force-pushed the unselect-datatable-row branch from cfbf9a3 to 2940734 Compare March 22, 2022 19:10
@Sarthak0702 Sarthak0702 removed the DNM label Mar 22, 2022
@Sarthak0702
Copy link
Member Author

jenkins test dashboard

@Sarthak0702
Copy link
Member Author

jenkins test dashboard cephadm

votdev
votdev previously requested changes Mar 23, 2022
Copy link
Member

@votdev votdev left a comment

Choose a reason for hiding this comment

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

Nice idea, but i would like to see that this feature behaves the way a desktop user is used to from operating systems like Windows or Gnome, especially Windows Explorer, Nautilus or other file navigation tools. There you can unselect a row by using CTRL + LMB. It is not good to introduce a different workflow instead of implementing a widely used and accepted standard.

@Sarthak0702
Copy link
Member Author

Nice idea, but i would like to see that this feature behaves the way a desktop user is used to from operating systems like Windows or Gnome, especially Windows Explorer, Nautilus or other file navigation tools. There you can unselect a row by using CTRL + LMB. It is not good to introduce a different workflow instead of implementing a widely used and accepted standard.

So are you suggesting to use LMB to select a row but CTRL+LMB to unselect? Wouldn't that be a bit confusing for the user?

@votdev
Copy link
Member

votdev commented Mar 23, 2022

Nice idea, but i would like to see that this feature behaves the way a desktop user is used to from operating systems like Windows or Gnome, especially Windows Explorer, Nautilus or other file navigation tools. There you can unselect a row by using CTRL + LMB. It is not good to introduce a different workflow instead of implementing a widely used and accepted standard.

So are you suggesting to use LMB to select a row but CTRL+LMB to unselect? Wouldn't that be a bit confusing for the user?

Yes, that is the standard in Windows and Linux UIs.

@Sarthak0702
Copy link
Member Author

Yes, that is the standard in Windows and Linux UIs.

Hmm, I see. FYI, for selectionType:'multiClick' (check Cluster -> OSDs) in ngx-datable (on which TableComponent is built) LMB is used to select and unselect rows natively. So we need to do disable that somehow too.

@votdev
Copy link
Member

votdev commented Mar 23, 2022

Yes, that is the standard in Windows and Linux UIs.

Hmm, I see. FYI, for selectionType:'multiClick' (check Cluster -> OSDs) in ngx-datable (on which TableComponent is built) LMB is used to select and unselect rows natively. So we need to do disable that somehow too.

Yes i know, this was IMO also not implemented the right way. But it's not my decision which style the Dashboard follows, but i think it should go the same way as the most common operating systems and file navigators do. I mean, the LMB approach to select and unselect will work on touch devices, but i don't think someone is using the Dashboard on those devices.

@Sarthak0702
Copy link
Member Author

Yes i know, this was IMO also not implemented the right way. But it's not my decision which style the Dashboard follows, but i think it should go the same way as the most common operating systems and file navigators do. I mean, the LMB approach to select and unselect will work on touch devices, but i don't think someone is using the Dashboard on those devices.

Honesty I do find using CTRL+ LMB to unselect rows a bit inorganic in a web based application. Have a look at this: https://www.patternfly.org/v4/components/table#composable-row-click-handler-hoverable--selected-rows
Also, surprisingly there are some folks who do use dashboard on touch devices (like iPads). Nevertheless, I and @epuertat would agree, feel that the dashboard tables look a bit outdated, and some modern UI changes would surely improve UX. For this I have opened a tracker issue: https://tracker.ceph.com/issues/55095

@epuertat
Copy link
Member

jenkins test dashboard

@Sarthak0702 Sarthak0702 dismissed votdev’s stale review April 29, 2022 11:02

change request to be covered in a different tracker: https://tracker.ceph.com/issues/55095

@pereman2
Copy link
Contributor

pereman2 commented May 5, 2022

jenkins test dashboard

@Sarthak0702 Sarthak0702 force-pushed the unselect-datatable-row branch from 36c424d to 761c112 Compare May 5, 2022 08:01
@epuertat
Copy link
Member

epuertat commented May 5, 2022

jenkins test dashboard cephadm

1 similar comment
@pereman2
Copy link
Contributor

pereman2 commented May 5, 2022

jenkins test dashboard cephadm

@pereman2
Copy link
Contributor

pereman2 commented May 5, 2022

jenkins test dashboard

1 similar comment
@Sarthak0702
Copy link
Member Author

jenkins test dashboard

@Sarthak0702 Sarthak0702 force-pushed the unselect-datatable-row branch from 761c112 to 84d74d8 Compare May 5, 2022 20:12
@Sarthak0702
Copy link
Member Author

jenkins test make check

1 similar comment
@Sarthak0702
Copy link
Member Author

jenkins test make check

@Sarthak0702 Sarthak0702 force-pushed the unselect-datatable-row branch 2 times, most recently from 5753c66 to 78ca0cc Compare May 6, 2022 20:51
@Sarthak0702 Sarthak0702 force-pushed the unselect-datatable-row branch 2 times, most recently from d2cbc31 to b69ad53 Compare May 10, 2022 18:24
@Sarthak0702
Copy link
Member Author

jenkins test dashboard cephadm

1 similar comment
@Sarthak0702
Copy link
Member Author

jenkins test dashboard cephadm

@epuertat
Copy link
Member

jenkins test api

@epuertat
Copy link
Member

jenkins test dashboard cephadm

Fixes: https://tracker.ceph.com/issues/53244
Signed-off-by: Sarthak0702 <sarthak.0702@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

7 participants