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

UITEN-233: Improve "Number of locations" on Campuses page #349

Merged
merged 9 commits into from
Jun 23, 2023

Conversation

UladzislauKutarkin
Copy link
Contributor

@UladzislauKutarkin UladzislauKutarkin commented Jun 21, 2023

Remember value in Institutions and campuses dropdown (Settings > Tenant > Libraries) when navigating away from page and

Purpose

UITEN-233

Approach

TODOS and Open Questions

Learning

Pre-Merge Checklist

Before merging this PR, please go through the following list and take appropriate actions.

  • I've added appropriate record to the CHANGELOG.md
  • Does this PR meet or exceed the expected quality standards?
    • Code coverage on new code is 80% or greater
    • Duplications on new code is 3% or less
    • There are no major code smells or security issues
  • Does this introduce breaking changes?
    • If any API-related changes - okapi interfaces and permissions are reviewed/changed correspondingly
    • There are no breaking changes in this PR.

If there are breaking changes, please STOP and consider the following:

  • What other modules will these changes impact?
  • Do JIRAs exist to update the impacted modules?
    • If not, please create them
    • Do they contain the appropriate level of detail? Which endpoints/schemas changed, etc.
    • Do they have all they appropriate links to blocked/related issues?
  • Are the JIRAs under active development?
    • If not, contact the project's PO and make sure they're aware of the urgency.
  • Do PRs exist for these changes?
    • If so, have they been approved?

Ideally all of the PRs involved in breaking changes would be merged in the same day to avoid breaking the folio-testing environment. Communication is paramount if that is to be achieved, especially as the number of intermodule and inter-team dependencies increase.

While it's helpful for reviewers to help identify potential problems, ensuring that it's safe to merge is ultimately the responsibility of the PR assignee.

…ings > Tenant > Libraries) when navigating away from page and returning
@github-actions
Copy link

github-actions bot commented Jun 21, 2023

Jest Unit Test Statistics

  1 files  ±  0  24 suites  +24   1m 14s ⏱️ + 1m 14s
77 tests +77  73 ✔️ +73  4 💤 +4  0 ±0 
79 runs  +79  75 ✔️ +75  4 💤 +4  0 ±0 

Results for commit 6c65ca4. ± Comparison against base commit faac09d.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Jun 21, 2023

BigTest Unit Test Statistics

0 tests  ±0   0 ✔️ ±0   0s ⏱️ ±0s
0 suites ±0   0 💤 ±0 
0 files   ±0   0 ±0 

Results for commit 6c65ca4. ± Comparison against base commit faac09d.

♻️ This comment has been updated with latest results.

@UladzislauKutarkin UladzislauKutarkin requested review from vashjs and a team June 21, 2023 19:24
package.json Outdated
@@ -181,6 +184,8 @@
"@babel/eslint-parser": "^7.19.1",
"@babel/plugin-proposal-class-properties": "^7.12.1",
"@babel/plugin-proposal-decorators": "^7.0.0",
"@babel/plugin-proposal-private-methods": "^7.18.6",

Choose a reason for hiding this comment

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

Some -proposal- plugins were renamed in stripes-webpack to -transform- because they became standard and will were renamed by babel.
folio-org/stripes-webpack#114
Please rename the same plugins here and in babel.config.js

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@BogdanDenis done. Thanks for information

@@ -107,10 +110,14 @@ class LocationLibraries extends React.Component {

onChangeInstitution = (e) => {
this.setState({ institutionId: e.target.value, campusId: null });

sessionStorage.setItem('institutionIdLibraries', e.target.value);
}

onChangeCampus = (e) => {
this.setState({ campusId: e.target.value });
Copy link
Contributor

Choose a reason for hiding this comment

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

e.target.value can be moved to variable

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -107,10 +110,14 @@ class LocationLibraries extends React.Component {

onChangeInstitution = (e) => {
this.setState({ institutionId: e.target.value, campusId: null });
Copy link
Contributor

Choose a reason for hiding this comment

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

e.target.value can be moved to variable

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor

@Terala-Priyanka Terala-Priyanka left a comment

Choose a reason for hiding this comment

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

As per the ticket description, The # of libraries in the column should be a link to a pre-filtered view of Settings > Tenant > Locations > Libraries showing only those libraries in the campus.

I tried to pull your branch and bring up local host serving with snapshot. I do not see column with links.
Am I doing something differently? Could you share a screencast?

@UladzislauKutarkin
Copy link
Contributor Author

As per the ticket description, The # of libraries in the column should be a link to a pre-filtered view of Settings > Tenant > Locations > Libraries showing only those libraries in the campus.

I tried to pull your branch and bring up local host serving with snapshot. I do not see column with links. Am I doing something differently? Could you share a screencast?

My bad, I linked the wrong ticket. Now it's clear. Please take a look again

@Terala-Priyanka
Copy link
Contributor

As per the ticket description, The # of libraries in the column should be a link to a pre-filtered view of Settings > Tenant > Locations > Libraries showing only those libraries in the campus.
I tried to pull your branch and bring up local host serving with snapshot. I do not see column with links. Am I doing something differently? Could you share a screencast?

My bad, I linked the wrong ticket. Now it's clear. Please take a look again

Thank you for updating the details.
I see different details in User Story and in scenario. However, your PR changes address

As per the ticket description, The # of libraries in the column should be a link to a pre-filtered view of Settings > Tenant > Locations > Libraries showing only those libraries in the campus.
I tried to pull your branch and bring up local host serving with snapshot. I do not see column with links. Am I doing something differently? Could you share a screencast?

My bad, I linked the wrong ticket. Now it's clear. Please take a look again

Thank you for updating the details.
As seen from the ticket, UserStory talks about Settings > Tenant > Locations and scenario talks about Settings > Tenant > Libraries.
Did you get a chance to cross check with your PO about this?
Your changes LGTM against Settings > Tenant > Libraries

@UladzislauKutarkin
Copy link
Contributor Author

Yes, we need to remember value in Libraries.

@sonarcloud
Copy link

sonarcloud bot commented Jun 23, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

66.7% 66.7% Coverage
0.0% 0.0% Duplication

@UladzislauKutarkin UladzislauKutarkin merged commit 4d0394a into master Jun 23, 2023
6 checks passed
@UladzislauKutarkin UladzislauKutarkin deleted the UITEN-233 branch June 23, 2023 08:03
Copy link
Member

@zburke zburke left a comment

Choose a reason for hiding this comment

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

This PR re-introduced some node config that was deliberately expunged in the past. Please remove it again :)

NODEJS_VERSION: '14'
NODEJS_VERSION: '16'
Copy link
Member

Choose a reason for hiding this comment

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

These kinds of change should be handled in a separate PR. If there was a bug in the LocationLibraries.js code and we had to revert it, we'd lose this change too.

Comment on lines +11 to +13
"engines": {
"node": ">=14.0.0"
},
Copy link
Member

Choose a reason for hiding this comment

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

engines describes the runtime requirements of this module, but this is a web application, not a NodeJS application. This clause was deliberately removed. Please remove it again.

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