Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Show a list of facilities successfully claimed by the current contributor #573

Merged
merged 4 commits into from Jun 13, 2019

Conversation

jwalgran
Copy link
Contributor

@jwalgran jwalgran commented Jun 10, 2019

Overview

Change the "My Facilities" link in the navbar to link to a new page showing a list of all approved facility claims for the currently logged in contributor.

Connects #543

Demo

My Facilities

Screen Shot 2019-06-12 at 4 03 58 PM

Empty List

Screen Shot 2019-06-12 at 4 03 38 PM

Claim A Facility Disabled

Screen Shot 2019-06-12 at 4 06 08 PM

Notes

The wireframes include showing the status of a claim and removing the claim but these are out of scope of #543 which specifies showing only approved claims.

Testing Instructions

This assumes that the fixture data is loaded and processed

  • Disable claim a facility with ./scripts/manage waffle_switch claim_a_facility off. Restart `./scripts.server.
  • Log in as c2@example.com and verify that "My Facilities" does not appear in the navbar dropdown.
  • Enable claim a facility with ./scripts/manage waffle_switch claim_a_facility on. Restart `./scripts.server.
  • Log in as c2@example.com, search for a facility, and submit a claim.
  • Select "My Facilities" from the navbar dropdown and verify that a "no approved claims" message is shown.
  • In a separate browser log in as c1@example.com and browse http://localhost:6543/dashboard/claims. Approve the facility claim.
  • Back in the original browser select "My Facilities" from the navbar dropdown and verify that the approved facility now appears and that clicking on it navigates to a placeholder details page.

Checklist

  • fixup! commits have been squashed
  • CI passes after rebase
  • CHANGELOG.md updated with summary of features or fixes, following Keep a Changelog guidelines

@jwalgran jwalgran force-pushed the jcw/claimed-list branch 4 times, most recently from 4f53f86 to 9ce2457 Compare June 12, 2019 22:47
@jwalgran jwalgran changed the title WIP Claimed facility list Show a list of facilities successfully claimed by the current contributor Jun 12, 2019
@jwalgran jwalgran marked this pull request as ready for review June 12, 2019 23:19
@jwalgran jwalgran requested a review from rajadain June 12, 2019 23:19
@kellyi kellyi requested review from kellyi and removed request for rajadain June 13, 2019 01:01
@kellyi kellyi assigned kellyi and unassigned rajadain Jun 13, 2019
@kellyi
Copy link
Contributor

kellyi commented Jun 13, 2019

I made #586 for the wire-frame-related updates.

@kellyi
Copy link
Contributor

kellyi commented Jun 13, 2019

I tested this out and it's working almost perfectly! There are two small UI things that may not be blocking on merging, but which I did want to surface in case we would like to address them here or subsequently:

First: in Firefox the "no claimed facilities" message doesn't place the button beneath the message. I think this can be fixed just by putting the two elements in a common container, then giving it display: flex and flex-direction: column:

Screen Shot 2019-06-12 at 9 17 53 PM

Second, also in Firefox: when I click a row to go to a facility details page and then click the back button to return to the list page, for a split second I can see the "no claimed facilities" message before searching commences and it changes to the CircularProgress spinner. The back button seemed to be the only condition in which I could create the split-second quirk. It's not a show-stopper, though, so we could live with it if it's not easy to remedy.

Copy link
Contributor

@kellyi kellyi 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 working well! I made a note of two style-issues that we may want to remedy before merging. One should be fairly simple; the other seems to be related to Redux actions sequences and I couldn't readily see why it was doing what it was doing when stepping through with redux-devtools.

@jwalgran
Copy link
Contributor Author

Thanks for review and pointing out those two issues.
I was able to fix the button-on-same-line issue but just changing the fragment to a div. No style needed.

We paired on the flash of submit button issues and solved it by paying attention to whether data is null or an empty list.

@kellyi
Copy link
Contributor

kellyi commented Jun 13, 2019

Ooof -- sorry about this but I introduced a merge conflict by merging #575

We want to provide a logged in contributor with a list of all the facilities
they have successfully claimed.
Repurposes the "My Facilities" link the navbar to show a page listing all
approved facility claims. Items in the list link to the facility profile page
where additional information about the facility can be collected.

The "My Facilities" link now depends on the claim a facility feature so we have
updated the `NavbarLoginButtonGroup` to only show the link when the feature flag
is enabled.
This additional information helps to identify the facility when there may be
more than one claimed facility with the same name.
@jwalgran jwalgran merged commit f444b4f into develop Jun 13, 2019
@jwalgran jwalgran deleted the jcw/claimed-list branch June 13, 2019 17:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants