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 navigation via clicking recent allocation row #6087

Merged
merged 2 commits into from
Aug 8, 2019

Conversation

backspace
Copy link
Contributor

I noticed that the allocation row from job overview had the pointer cursor but clicking outside the allocation id didn’t actually do anything. It looks like the action was written for a controller context, so I changed it to use the router service. I also added .id to the transition call because without it I was getting You didn't provide enough string/numeric parameters to satisfy all of the dynamic segments for route. Maybe this is because the router definition is looking for allocation_id, but I didn’t want to get into changing that.

I added a test, which ended up being a set of tests, because of the moduleForJob extraction. You can see it failing here (linking to a set of lines in travis-web appears to be broken 😞) before I committed the fix.

@backspace backspace changed the title Fix navigation by clicking recent allocation row Fix navigation via clicking recent allocation row Aug 7, 2019
@backspace backspace requested review from DingoEatingFuzz and a team August 7, 2019 18:09
@@ -20,7 +23,7 @@ export default Component.extend({

actions: {
gotoAllocation(allocation) {
this.transitionToRoute('allocations.allocation', allocation);
this.router.transitionTo('allocations.allocation', allocation.id);
Copy link

Choose a reason for hiding this comment

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

any specific reason to reload the record?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I found that without the .id, I got this error:

You didn't provide enough string/numeric parameters to satisfy all of the dynamic segments for route

My belief is that it’s because the router is expecting allocation_id, but the model only has an id. Changing the router seemed like Too Much for this small fix.

Copy link

@gregone gregone left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@DingoEatingFuzz DingoEatingFuzz left a comment

Choose a reason for hiding this comment

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

Nice, UX++ I wonder how long that has been broken 😬

@backspace backspace merged commit a8c90f5 into master Aug 8, 2019
@backspace backspace deleted the b-ui/allocation-row-navigation branch August 8, 2019 14:26
backspace added a commit that referenced this pull request Aug 8, 2019
@github-actions
Copy link

github-actions bot commented Feb 5, 2023

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 5, 2023
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