-
Notifications
You must be signed in to change notification settings - Fork 56
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
[ENG-4077] Fix accessing component's registration #2001
[ENG-4077] Fix accessing component's registration #2001
Conversation
Pull Request Test Coverage Report for Build 6510376027
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does fix the problem, but adds an unnecessary AJAX call to fetch the asynchronous root
relationship.
There is a reason why the bug only happens when you transition from the project's registration list view to the registration overview page by clicking the link, but not when you go to the registration overview page directly. There is some race condition going on here and the proper fix would be to address the race condition.
2394e6b
to
3910a2a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally and it seems it's not quite doing what it's supposed to do.
The correct behavior of the page:
- When the registration is a root registration, it should not show any link.
- When the registration is a non-root registration, it should show a link pointing to the root registration
However the behavior of the page after these changes would be:
- When the registration is a root registration, it shows a link pointing to itself.
- When the registration is a non-root registration, it doesn't show any link.
eac946c
to
d63cb61
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked locally again. The link is missing after transitioning from the registration list to the registration overview page.
I'd like to expand more on the cause of the bug. Ember has asynchronous routing feature. That means, if the route model
hook of a particular route returns a promise (as is the case with guid-route
route), the route transition would happen after the promise returned by the model
hook is resolved. In this case, the bug happens because the promise returned by the model
hook does resolve, but the root
relationship of the registration has still yet to be loaded. Note that this happens only when your transition from the registration list view to the registration overview route. The fix to the bug requires understanding why the promise returned by the model
hook resolves but the root
relationship is still not loaded.
6816c64
to
7defae4
Compare
…ed OsfLink to use if logic instead of unless.
7814715
to
26ecfad
Compare
Purpose
The purpose of these changes is to fix accessing a component's registration from the component's project registrations page.
Summary of Changes
Screenshot(s)
Figure 1: OsfLink now displays on the registries overview page of linked projects
Side Effects
There should be no side effects.
QA Notes
-Does the link text now properly display?
-Does the link route you to the appropriate component?
-Does the rest of the registration summary now display when opened from the project registration page?