Closed Bug 1479746 Opened 6 years ago Closed 6 years ago

[remote-dbg-next] Add router-like feature to navigate via URL bar

Categories

(DevTools :: about:debugging, enhancement, P1)

enhancement

Tracking

(firefox65 fixed)

RESOLVED FIXED
Firefox 65
Tracking Status
firefox65 --- fixed

People

(Reporter: jdescottes, Assigned: ladybenko)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

The current about debugging allows to jump between categories via URL navigation. We should have something similar for the new about debugging, to switch between the different screens accessible via the sidebar. This was slightly discussed in our architecture document draft: https://docs.google.com/document/d/1zCoFfG8Wm3M5y_EI5o4JYNJPYvZbzreguENKoAsCymo/edit# The goal of this bug is to either implement our own router-like feature or reuse an existing one and plug it in the new UI.
Comments in the document point suggest to either: - reuse existing library (for instance, React Router https://redux.js.org/advanced/usagewithreactrouter) - use simple custom implementation If we go for a custom implementation, it should be clearly documented.
Moving major about:debugging ng work into milestone 1, leaving m0 for prior bugfix work.
Brian you mentioned using a custom implementation for the router. Any example to share here?
Flags: needinfo?(bbirtles)
Yeah, the one I use is here: https://github.com/birtles/10sai/tree/dev/src/route https://github.com/birtles/10sai/blob/dev/src/components/Link.tsx It's probably more complex than we need for this, however. First of all, it's redux-based which we may or may not need. Secondly, most of the complexity comes from how it tries to recognize "back" links, and, when a "back" link matches the previous URL in the history (which it stores in redux state, since browser APIs don't let you peek into that), it pops history state rather than always growing it. As a result, clicking an in-content back button feels more like pressing a back button on the browser (something I was particularly concerned about for Android devices). But again we probably don't need that. It also has an "active link" distinction too which we probably don't need. There are a few articles around about creating your own router too like the following: http://jamesknelson.com/routing-with-raw-react/ https://medium.freecodecamp.org/you-might-not-need-react-router-38673620f3d
Flags: needinfo?(bbirtles)
No longer blocks: remote-debugging-ng-m1
Priority: P3 → P2
Assignee: nobody → balbeza
Status: NEW → ASSIGNED
Priority: P2 → P1
Follow up bug to check the license file https://bugzilla.mozilla.org/show_bug.cgi?id=1509470
Pushed by balbeza@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/cc18f53a55f0 Add router-like feature to navigate via URL bar. r=jdescottes,daisuke https://hg.mozilla.org/integration/autoland/rev/1932b5f4e837 (part 2) Add test for routes. r=jdescottes,daisuke https://hg.mozilla.org/integration/autoland/rev/99fb2b795799 (part 3) Instructions to upgrade react-router-dom library. r=jdescottes
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 65
Depends on: 1510917
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: