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

[Recently Viewed Items] Disable button if no items #6503

Closed
jvigliotta opened this issue Mar 24, 2023 · 3 comments · Fixed by #6533
Closed

[Recently Viewed Items] Disable button if no items #6503

jvigliotta opened this issue Mar 24, 2023 · 3 comments · Fixed by #6533

Comments

@jvigliotta
Copy link
Contributor

Is your feature request related to a problem? Please describe.
No, no issue. It would just be nice to have the button to clear recently viewed objects be disabled until there are recently viewed objects to clear.

Describe the solution you'd like
Add the disabled attributed to the button if there are no recently viewed items.

Additional context
With items... good to go!
Screen Shot 2023-03-24 at 12 59 30 PM

With no items, still active.
Screen Shot 2023-03-24 at 12 59 42 PM

Would like it to be disabled.
Screen Shot 2023-03-24 at 1 00 01 PM

@jvigliotta jvigliotta added type:enhancement help_wanted Help the Open MCT project! labels Mar 24, 2023
vhenckel added a commit to vhenckel/openmct that referenced this issue Mar 30, 2023
@ozyx ozyx closed this as completed in #6533 Apr 3, 2023
ozyx added a commit that referenced this issue Apr 3, 2023
* add e2e test

* fix: remove slow function

* test: After deactivating the button, new objects must be inserted and the button becomes active again

* test: ensure clear recent objects button is active or inactive

* add an event to notify when an object is inserted in the recents list

* add an event to notify when an object is inserted in the recents list

* fix: adjusting function name and add validation for triggering the event

* fix: add event to disable button only when user click ok to clear list of recents

* test: fix failing e2e + better assertions

---------

Co-authored-by: Jesse Mazzella <jessemazzella@gmail.com>
@ozyx ozyx added unverified needs:test instructions Missing testing notes and removed help_wanted Help the Open MCT project! labels Apr 4, 2023
@ozyx
Copy link
Member

ozyx commented Apr 4, 2023

Testing Instructions

  • Navigate to an object in Open MCT
  • Observe that the Recent Items list is populated, and the "Clear" button is enabled
  • Click the "Clear" button
  • Observe that the Recent Items list is empty, and the "Clear" button is disabled
  • Navigate to a different object in Open MCT
  • Observe that the Recent Items list is populated, and the "Clear" button is enabled again

@ozyx ozyx removed the needs:test instructions Missing testing notes label Apr 4, 2023
@ozyx ozyx added this to the Target: 2.2.2 milestone Apr 4, 2023
@khalidadil
Copy link
Contributor

Verified Fixed in Testathon on 04/17/23

@rukmini-bose
Copy link
Contributor

Verified Testathon 4/13/2023

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

Successfully merging a pull request may close this issue.

5 participants