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

#5697 - Update the levels displayed in breadcrumbs across the app #7732

Merged
merged 47 commits into from
Sep 22, 2022

Conversation

elvisdorkenoo
Copy link
Contributor

@elvisdorkenoo elvisdorkenoo commented Aug 16, 2022

Update the levels displayed in breadcrumbs across the app

This request is to update how we handle breadcrumbs so that we show all levels except for the level the user themselves belongs to, the top-most level.
Summary of expected behavior here :

#5697

Code review checklist

  • Readable: Concise, well named, follows the style guide, documented if necessary.
  • Documented: Configuration and user documentation on cht-docs
  • Tested: Unit and/or e2e where appropriate
  • Internationalised: All user facing text
  • Backwards compatible: Works with existing data and configuration or includes a migration. Any breaking changes documented in the release notes.

License

The software is provided under AGPL-3.0. Contributions to this project are accepted under the same license.

@elvisdorkenoo elvisdorkenoo requested a review from jkuester August 25, 2022 20:08
@elvisdorkenoo elvisdorkenoo marked this pull request as ready for review August 26, 2022 22:26
Copy link
Contributor

@jkuester jkuester left a comment

Choose a reason for hiding this comment

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

This is a solid start! I have added some questions/suggestions inline.

webapp/src/ts/modules/reports/reports.component.ts Outdated Show resolved Hide resolved
webapp/src/ts/modules/reports/reports.component.ts Outdated Show resolved Hide resolved
webapp/src/ts/modules/reports/reports.component.ts Outdated Show resolved Hide resolved
webapp/src/ts/modules/reports/reports.component.ts Outdated Show resolved Hide resolved
webapp/src/ts/modules/reports/reports.component.ts Outdated Show resolved Hide resolved
webapp/src/ts/services/search.service.ts Outdated Show resolved Hide resolved
webapp/src/ts/modules/messages/messages.component.ts Outdated Show resolved Hide resolved
webapp/src/ts/modules/messages/messages.component.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@latin-panda latin-panda left a comment

Choose a reason for hiding this comment

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

Nice!
I agree with Josh feedback and added a couple more things.

webapp/src/ts/modules/messages/messages.component.ts Outdated Show resolved Hide resolved
webapp/src/ts/modules/messages/messages.component.ts Outdated Show resolved Hide resolved
webapp/src/ts/modules/messages/messages.component.ts Outdated Show resolved Hide resolved
webapp/src/ts/modules/messages/messages.component.ts Outdated Show resolved Hide resolved
webapp/src/ts/modules/messages/messages.component.ts Outdated Show resolved Hide resolved
webapp/src/ts/modules/reports/reports.component.ts Outdated Show resolved Hide resolved
webapp/src/ts/modules/reports/reports.component.ts Outdated Show resolved Hide resolved
webapp/src/ts/modules/reports/reports.component.ts Outdated Show resolved Hide resolved
webapp/src/ts/services/user-contact.service.ts Outdated Show resolved Hide resolved
@latin-panda
Copy link
Contributor

I think you need to fix the failing e2e... it's probably not a flaky one 🤔

@jkuester jkuester mentioned this pull request Sep 2, 2022
5 tasks
Copy link
Contributor

@latin-panda latin-panda left a comment

Choose a reason for hiding this comment

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

Good progress!! We're almost there! 🤩 I added some suggestions in line

@elvisdorkenoo
Copy link
Contributor Author

One question, do we change the target branch of the PR from master to 3.17.x ? @jkuester @latin-panda

Copy link
Contributor

@jkuester jkuester left a comment

Choose a reason for hiding this comment

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

Couple minor suggestions, but otherwise I think this is pretty much ready to go!

@jkuester
Copy link
Contributor

@elvisdorkenoo regarding the target branch for this PR, I think we should leave it as master. Once this per is Squashed and merged into master, we can cherrypick the commit into 3.17.x.

Copy link
Contributor

@jkuester jkuester left a comment

Choose a reason for hiding this comment

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

Also, wanted to bring this up for the sake of completeness (before we send this over to QA). @elvisdorkenoo @latin-panda do you think we need any kind of e2e test for this?

I have gone back and forth on this, but I am kinda leaning towards adding a test. This functionality depends on interacting with multiple services. The current unit tests have properly stubbed out the behavior of those services, but it seems like a good idea to have at least one e2e test that verifies the breadcrumbs are actually displayed as expected in the app when logged in as an offline user....

@jkuester jkuester self-requested a review September 14, 2022 20:08
@elvisdorkenoo
Copy link
Contributor Author

Also, wanted to bring this up for the sake of completeness (before we send this over to QA). @elvisdorkenoo @latin-panda do you think we need any kind of e2e test for this?

I have gone back and forth on this, but I am kinda leaning towards adding a test. This functionality depends on interacting with multiple services. The current unit tests have properly stubbed out the behavior of those services, but it seems like a good idea to have at least one e2e test that verifies the breadcrumbs are actually displayed as expected in the app when logged in as an offline user....

I tried to take a look to the existing e2e tests to see if there is anything about breadcrumbs as in this PR we are only updating the displayed levels, and for now, there are no e2e for breadcrumbs that I can find.

@latin-panda
Copy link
Contributor

latin-panda commented Sep 15, 2022

@elvisdorkenoo we have been building the test coverage recently, so I think we still don't have an e2e test for breadcrumbs in specific. As per Gareth comments before, we are supposed to ship PRs with at least 1 e2e test, which I agree :)
Take a look at this file, it's a good sample of how to do an e2e for Reports tab, you just need a selector to check breadcrumbs texts.

Do you think you can complete 1 e2e today? You will have to pay extra attention in how these are written to get less feedback as possible.

@elvisdorkenoo
Copy link
Contributor Author

@elvisdorkenoo we have been building the test coverage recently, so I think we still don't have an e2e test for breadcrumbs in specific. As per Gareth comments before, we are supposed to ship PRs with at least 1 e2e test, which I agree :) Take a look at this file, it's a good sample of how to do an e2e for Reports tab, you just need a selector to check breadcrumbs texts.

Do you think you can complete 1 e2e today? You will have to pay extra attention in how these are written to get less feedback as possible.

Yes, I will add the e2e test, thanks for the sample.

@latin-panda
Copy link
Contributor

@elvisdorkenoo how is the e2e going? Do you think we review today?

@elvisdorkenoo
Copy link
Contributor Author

@elvisdorkenoo how is the e2e going? Do you think we review today?

Yes thanks for the help, I did a push with en e2e test for report, you can take a look @latin-panda and @jkuester

Copy link
Contributor

@latin-panda latin-panda left a comment

Choose a reason for hiding this comment

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

Nice! I don't have further suggestions regarding logic. However I left some comments regarding format which should be quick to fix, please make sure that CI is fully green after you push the changes.

@jkuester can you please have a look? Thanks for your time.

Copy link
Contributor

@latin-panda latin-panda left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you!

Copy link
Contributor

@jkuester jkuester left a comment

Choose a reason for hiding this comment

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

Everything here looks good!

Did we decide we did not need an e2e test for the message's breadcrumbs?

@elvisdorkenoo
Copy link
Contributor Author

Everything here looks good!

Did we decide we did not need an e2e test for the message's breadcrumbs?

Thank you @jkuester, it's the same for the tasks in #7757 as well. I’ve created this ticket and I will be doing this next as a separate PR

@elvisdorkenoo elvisdorkenoo merged commit 263bae1 into master Sep 22, 2022
latin-panda pushed a commit that referenced this pull request Oct 6, 2022
@elvisdorkenoo elvisdorkenoo mentioned this pull request Nov 4, 2022
5 tasks
@craig-landry craig-landry mentioned this pull request Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants