Closed Bug 1940141 Opened 1 month ago Closed 29 days ago

Move resourceUriPlugin from browser/components/newtab into a common location

Categories

(Firefox :: New Tab Page, task)

task

Tracking

()

RESOLVED FIXED
136 Branch
Tracking Status
firefox136 --- fixed

People

(Reporter: mconley, Assigned: pdahiya)

References

(Blocks 1 open bug)

Details

(Whiteboard: [hnt-trainhop])

Attachments

(1 file)

It looks like the newtab, asrouter and aboutwelcome test and packaging infrastructure all rely on this resourceUriPlugin.js script here.

We should move that out into its own common location. Maybe browser/tools, but I'm open to alternatives... one thing I'm noodling on, is that Storybook probably needs to do this kind of thing too. Maybe the ReComp team already have a script like this somewhere that we can re-use instead?

Hey hjones! Does Storybook have some kind of webpack-y plugin stuff for turning resource:// URIs into file paths somewhere?

Flags: needinfo?(hjones)

Interesting! We do have something conceptually similar that we use to map chrome:// URIs to the path on disk. It might also work for resource:// URIs, but I expect it's pretty heavy handed for your needs...

The plugin entrypoint is here and the chrome URI rewriting logic lives here. It all relies on having a chrome-map.js file which we generate via the build command, but don't check in (because it's massive...). It looks like chrome-map.js does contain resource:// URIs but it feels like overkill to generate that file if you don't also need to rewrite chrome:// paths.

Flags: needinfo?(hjones)

Okay, thanks, hjones!

Hey pdahiya, maybe for now, we might consider moving resouceUriPlugin under, say, browser/tools?

(In reply to Mike Conley (:mconley) (:⚙️) from comment #3)

Okay, thanks, hjones!

Hey pdahiya, maybe for now, we might consider moving resouceUriPlugin under, say, browser/tools?

Sounds good, attached patch moving resouceUriPlugin under browser/tools thanks!

Assignee: nobody → pdahiya
Status: NEW → ASSIGNED
Pushed by pdahiya@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/cec10e7f214c Move resourceUriPlugin from browser/components/newtab into a common location r=home-newtab-reviewers,omc-reviewers,mconley,emcminn
Status: ASSIGNED → RESOLVED
Closed: 29 days ago
Resolution: --- → FIXED
Target Milestone: --- → 136 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: