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

Fix Share modal behavior in project listing #2614

Merged
merged 1 commit into from
Jan 22, 2018

Conversation

rajadain
Copy link
Member

Overview

The Share modal relies on the project.hydroshare field, which was missing from the ProjectListing serializer. By adding it there, we ensure that the share modal works correctly.

Connects #2611

Demo

2018-01-22 11 17 34

Testing Instructions

  • Check out this branch and bundle
  • Ensure you have at least one project exported to HydroShare
  • Go to the My Projects listing, and click the Share button for any project. Ensure it reflects the correct state of sharing for that project.
  • Try sharing a project from the listing page. Ensure it is exported to HydroShare correctly.

The Share modal relies on the project.hydroshare field to work
correctly, which was missing from the ProjectListing serializer.
By adding it there, we ensure that the share modal works correctly.
Copy link

@arottersman arottersman left a comment

Choose a reason for hiding this comment

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

+1, I think this'll do given that most people don't know the projects page exists.

There's a small quirk where you can turn the hydroshare sharing on for a project from the Projects List, exit the modal while it's still polling, and then open the project. The project model on Modeling doesn't know that a hydroshare resource is being created, so its modal looks like it's not connected to hydroshare.

@arottersman arottersman assigned rajadain and unassigned arottersman Jan 22, 2018
@rajadain
Copy link
Member Author

Hmm. That is a quirk, but not very destructive, since even if the user doesn't see the right state in the detail page, they can see it if they refresh the page. Even if they share again without refreshing the page, we re-export to the same resource, so it doesn't perform any destructive operations.

The way to fix it would be to either:

  1. Persist the export progress in the database before it completes, so subsequent fetches know it's happening, which is a non-trivial change
  2. Transfer that state to App.currentProject somehow in addition to loading everything from the URL, which would be very hacky

I think it's small enough to warrant ignoring. /cc @ajrobbins

I'm going to merge this in for now. If we deem that to be necessary, we can make a card for it later.

@rajadain rajadain merged commit 3794426 into develop Jan 22, 2018
@rajadain rajadain deleted the tt/hydroshare-export-listing-modal branch January 22, 2018 21:48
@ajrobbins
Copy link

I agree that we do not need to accommodate that edge case at this time.

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

Successfully merging this pull request may close these issues.

None yet

3 participants