-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature/explorer routing #344
Conversation
This makes the typing of the initialize method a bit less strict, but it wasn't enforced anyway because the constructor method wasn't declared with this type to begin with. In exchange, we get less code and everything still checks.
One less memory leak!
A neater solution would be to turn this into a CollectionView.
I seem to have missed this in 905b6c9.
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.
Looks like a neat restructuring of the code! The only thing I doubted about was pulling together instance of view and data in global
, e.g. ExplorerView instance and source instance: adding extra files might mean a developer needs to click through more files to find definitions. However, I think I understand the reasoning and agree that in the long run this is probably cleaner.
Thanks! You make a valid point about having many modules to search through. While I believe in the general pattern, the sources and source-list-view modules are a bit superfluous. They can be removed when we implement #322, which is lightweight enough to not require global persistence. |
I'm excited with how well the routes adapt to opening new panels. However, going "back in history" might feel buggy to a user:
Both of this may have to do with point 2 of your "open ends", but I think they might interfere with user experience to some extend. I also noticed clicking the link "explore" doesn't bring back the source list. So while I approve of the code, I wonder whether it's wise to merge just yet. Point 3, the horizontal scrolling, is something I think I would need to discuss in person. I think I prefer option (I) (more horizontal motion but consistent with current behaviour), but can't picture how much / in which cases that motion would occur. |
Thanks for the excellent feedback! My plan for today is to address the concerns as well as I can, at least the low hanging fruits:
On the assumption that you need to build on these changes next week, I will probably merge whatever I have by the end of the day, unless you have a release planned on the very short term. Some rough edges that I'll likely postpone until after the merge:
|
@BeritJanssen I'm still tinkering with this, but I already fixed |
Earlier in this PR, I mentioned a RouteParser class, which was a somewhat opaque finite state machine. That class is gone, so hard-to-understand code shouldn't be an issue anymore. Two main issues remain after this merge, which I'll be creating new tickets for, to be linked below. Specific heads-up for @JeltevanBoheemen: You need to run |
This is quite a large set of changes. Full details in the commit log, summary below:
frontend/src/navigation
directory).For live testing, I suggest a couple of actions:
There are still some rough edges and open questions, but I decided to submit the branch now because @BeritJanssen was waiting for it:
/explore/item/14
(an LdItemPanel), and the window is wide enough to accomodate at least one whole other panel right of it, for example the RelatedItemsPanel with route/explore/item/14/related
, then the route of that panel to the right will appear in the address bar, instead of the route that you navigated back to. This also erases the browser history that came after/explore/item/14
. It is easy to fix, but there are two ways to do this and the consequences for the users are very different:/explore/item/100
), the action to take is conditional: either scroll to a panel that was already open, or reset the explorer with a new panel. As a consequence, the reset actions cannot be directly bound to the routes. If first deciding to scroll or to reset, as is currently the case in the exploration aspect module, this requires reconstructing the panels that go with the route name on reset, which is the task of the parser. It might be possible to reverse this, i.e., match a particular route first, then decide between scrolling and resetting.Fixes #62, fixes #289. Partially implements #106 (needs review).