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

change: [M3-6546] - Volume drawers and action menu refactored #10820

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

Conversation

dchyrva-akamai
Copy link
Contributor

Description 📝

Created new drawer for managing volume tags, action menu for the volume row updated.

Changes 🔄

  • Removed "Show Config" button from the volume table row and added to the actions menu.

  • Remove "Edit" button from the volume table row and added to the actions menu .

  • Added "Manage Tags" option to the volume table actions menu.

  • Added new "Manage Tags" drawer.

  • Existing volume tags functionality moved from "Edit Volume" drawer to "Manage Tags" drawer.

Copy link
Contributor

@jdamore-linode jdamore-linode left a comment

Choose a reason for hiding this comment

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

Thanks @dchyrva! Noticed a couple small issues with the E2E test changes but nothing too serious -- happy to help out if you run into any trouble addressing feedback!

@bnussman-akamai bnussman-akamai added the Volumes Relating to Volumes (aka Block Storage) label Aug 23, 2024
@dchyrva-akamai dchyrva-akamai force-pushed the feature/M3-6546 branch 2 times, most recently from 230f10a to 3600cea Compare August 26, 2024 09:34
Copy link
Contributor

@hkhalil-akamai hkhalil-akamai left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution! I had a couple of concerns:

  1. We have an existing drawer component called TagDrawer. Although the UI is slightly different, would it be possible to use that instead of re-implementing a similar component?
  2. The Figma prototype in the attached ticket includes the ability to group volumes by tags. Should this be implemented in this or another ticket (as it may require significant changes)?

Copy link

github-actions bot commented Aug 27, 2024

Coverage Report:
Base Coverage: 86.7%
Current Coverage: 86.63%

@bnussman-akamai bnussman-akamai changed the title change: [M3-6546] Volume drawers and action menu refactored. change: [M3-6546] - Volume drawers and action menu refactored Aug 28, 2024
@jaalah-akamai
Copy link
Contributor

jaalah-akamai commented Aug 29, 2024

We have an existing drawer component called TagDrawer. Although the UI is slightly different, would it be possible to use that instead of re-implementing a similar component?

@hkhalil-akamai The figma mock is using the version that's currently in place, which is essentially an autocomplete. Let's keep this in place for now until we can ask UX Thursday. Good question 👍

The Figma prototype in the attached ticket includes the ability to group volumes by tags. Should this be implemented in this or another ticket (as it may require significant changes)?

@dchyrva lets add this as part of a new PR - part 2.

@jaalah-akamai
Copy link
Contributor

Let's move forward with the the autocomplete tag implementation. We're eventually going to sunset the TagDrawer where we display each tag visually on the page.

@dchyrva-akamai dchyrva-akamai force-pushed the feature/M3-6546 branch 2 times, most recently from 89e390c to f083011 Compare September 4, 2024 11:25
Copy link
Contributor

@jaalah-akamai jaalah-akamai left a comment

Choose a reason for hiding this comment

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

Nice job @dchyrva-akamai

Copy link
Member

@bnussman-akamai bnussman-akamai left a comment

Choose a reason for hiding this comment

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

Getting an unexpected error when clearing tags

Screen.Recording.2024-09-06.at.3.05.24.PM.mov

@dchyrva-akamai
Copy link
Contributor Author

Hello, @bnussman-akamai

Thank you for catching the error.

Should be fixed now.

Copy link
Member

@bnussman-akamai bnussman-akamai left a comment

Choose a reason for hiding this comment

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

Looks good! I just have a few comments about the cypress test and form error handling

cy.defer(() => createVolume(volumeRequest), 'creating volume').then(
(volume: Volume) => {
// Volume needs some time to become active after creation.
cy.wait(1000);
Copy link
Member

Choose a reason for hiding this comment

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

Is there any more safe way we could go about this? I want to make sure we avoid test flake

Could we watch the UI for the status to change from Creating to Active?

@jdamore-linode Might have some better tips on how to avoid cy.wait calls

Copy link
Contributor

@jdamore-linode jdamore-linode Sep 9, 2024

Choose a reason for hiding this comment

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

@bnussman-akamai Yep, we should be avoiding cy.wait(<number of milliseconds>) if we can (explanation).

I think your suggestion to wait for the UI is what we do in other tests, and it'd look something like this:

cy.defer(() => createVolume(volumeRequest), 'creating volume').then(
      (volume: Volume) => {
        // Volume needs some time to become active after creation.
        // Find the Volume's label in the table, then narrow our selection to that table row.
        cy.findByText(volume.label)
          .should('be.visible')
          .closest('tr')
          .within(() => {
            // Wait for "Creating" status to become "Active".
            // I _think_ the actual DOM text is 'active' and not 'Active' and we use CSS for capitalization here, but
            // you might want to fact check me here.
            cy.findByText('active').should('be.visible');
          });

Edit: Here's an actual working example, except we do it slightly differently. We create the Volume and wait for it to be active by polling its status using the API, and then we visit the Volumes page and proceed with the test.

I'm thinking we might do this because of that events issue you and I looked at a few weeks back where sometimes an event's status doesn't change from started to finished and the UI doesn't automatically update as a result, but I don't remember 100%.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I think there is some API weirdness causing the status to not always update in the UI. I'll create a separate ticket to investigate that.

Copy link
Member

Choose a reason for hiding this comment

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

Created M3-8557 for that bug you mentioned @jdamore-linode

@dchyrva-akamai That example Joe shared using createActiveVolume might be a good option here!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bnussman-akamai @jdamore-linode Thank you for the comment, I used createActiveVolume instead.

Comment on lines +159 to +158
after(() => {
cleanUp(['tags', 'volumes']);
});
Copy link
Member

Choose a reason for hiding this comment

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

@jdamore-linode Is a clean up in the after okay?

Copy link
Contributor

Choose a reason for hiding this comment

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

It doesn't hurt anything, but I don't think it should be necessary since we're already doing clean up in the before hook (explanation why). @dchyrva-akamai any reason in particular this was added?

Copy link
Contributor Author

@dchyrva-akamai dchyrva-akamai Sep 12, 2024

Choose a reason for hiding this comment

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

@jdamore-linode I added clean up after in order to remove volumes, created for testing purposes, from the account.
Maybe you could recommend a better way of doing that?

Copy link
Contributor

Choose a reason for hiding this comment

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

@jdamore-linode can we double check if this is necessary?

Copy link
Contributor

Choose a reason for hiding this comment

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

@hkhalil-akamai No, it shouldn't be. @dchyrva-akamai might be able to speak more to his motivation for adding this (e.g. were you getting test failures that this solved?) but broadly speaking we should not be doing any clean up in after hooks (and the link I posted above explains why).

(The obvious elephant in the room is #11028 where I'm doing exactly that; that's an exceptional case that we agreed to for security compliance reasons, unlike this situation where the clean up is being done for the sake of setting up a test's state)

@bnussman-akamai bnussman-akamai removed the Add'tl Approval Needed Waiting on another approval! label Sep 9, 2024
@bnussman-akamai bnussman-akamai added the Approved Multiple approvals and ready to merge! label Sep 9, 2024
@dchyrva-akamai dchyrva-akamai force-pushed the feature/M3-6546 branch 2 times, most recently from fc36bad to 4d269f5 Compare September 12, 2024 12:10
Copy link

github-actions bot commented Oct 3, 2024

This PR is stale because it has been open 15 days with no activity. Please attend to this PR or it will be closed in 5 days

@github-actions github-actions bot added the Stale label Oct 3, 2024
Copy link
Contributor

@hkhalil-akamai hkhalil-akamai left a comment

Choose a reason for hiding this comment

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

Is there anything else blocking this PR, other than the one open question?

@github-actions github-actions bot removed the Stale label Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved Multiple approvals and ready to merge! Ready for Review Volumes Relating to Volumes (aka Block Storage)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants