-
Notifications
You must be signed in to change notification settings - Fork 4
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
Change back button to last viewed page #1522
base: dev
Are you sure you want to change the base?
Conversation
@varCepheid The way I designed the "back system" is that the back button goes "up a level", when that makes sense, and when there is no logical "up a level", it will perform the same action as the browser back button (go to the previous page). Sometimes, that system is confusing. Instead of changing the behavior on this one individual page, can you propose a new logical system for the back button across all pages? |
I acknowledge that the current system is confusing. Do you think it'd make sense for the back button in all cases to work the same as the browser back button? I would not be opposed to that kind of change. However, if we did that, then there would be no easy way to, for example, navigate from a match page to the event corresponding to that match, unless that is the page you came from. What do you think would make the most sense? |
I think your fix makes more sense, and there should be a link to the event page on the match page. |
moved the link under the name of the match and removed it from the event page
Note to self: finish working on match details card, seems to only be updating on event page; then fix the type errors. |
@calebeby routes/report, line 51: The back button had stopped editing mode when the report was being edited without changing the page. Now, the back button will always go to the browser's back no matter what. Should there be a button on the report page to stop editing, or is the Save Report button at the bottom good enough? |
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.
Hi @varCepheid! Thanks for your patience with me! I left some feedback. I got a chance to review almost all of the files in this PR, except I haven't had time to closely review the changes to the report editor yet (when big blocks of code are moved the diff view doesn't really show what, if anything was actually changed, so it takes longer to compare)
changed homepage argument of Page & Header to showBackButton and flipped the logic changed onEditClick argument of report-viewer to reportEditorLink and changed the Button to href shortened functions in saved-report-edit
Thanks for all the notes! I went with a |
@calebeby I've addressed all of the changes you've requested. Can you add another review or approve the changes? |
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.
Great work here! I still have yet to review the report editor changes, I can't remember why those are in this PR and I don't have time to look closely right now.
The changes to the
|
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.
@varCepheid This is looking really good! I finally remembered to come back here to look at the report viewer/editor changes. I left some comments.
Also feel free to bug me on slack if I forget to review things again!
@@ -73,7 +69,6 @@ const Event = ({ eventKey }: Props) => { | |||
</Heading> | |||
{newestIncompleteMatch && ( | |||
<MatchDetailsCard | |||
key={newestIncompleteMatch.key} |
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.
I am not sure why you removed this attribute. Having a key attribute helps Preact with diffing, so that it knows the difference between when items were changed, added, reordered, or removed. I think there was some weird edge case where when this page rerendered (due to the newestIncompleteMatch switching), it might have reset the input on the event matches list, or something like that.
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.
I removed it because the MatchDetailsCard
component doesn't have key
as a property. I don't know what it's passing into.
src/routes/saved-report.tsx
Outdated
</Card> | ||
</Page> | ||
) | ||
} |
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.
Before this PR, ReportPage
was shared between the offline report editor and the "online" report editor. It looks like you split it out here. My concern is that the two pages (which are intended to look and work essentially the same) may now get out of sync in case someone forgets to edit both. For example, someone may make a CSS change in one but not the other. The only real difference between the two is how they handle fetching/storing the report data. Is there a way to combine them back together? (same for the viewer and editor I think)
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.
I did what I thought would work well here, but I didn't do a thorough comparison of every pair of files among the six that existed. There isn't enough overlap between the viewer and the editor to consolidate.
closes #1497
This PR takes away the
back
attribute in thePage
element. It also adds a link to the event on event-specific pages and new pages for editing reports separate from the pages to view them.