Add Types and documentation for Setting and Preference config-work
Categories
(Firefox :: Settings UI, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox145 | --- | fixed |
People
(Reporter: mkennedy, Assigned: mkennedy)
References
(Depends on 1 open bug, Blocks 1 open bug)
Details
(Whiteboard: [recomp])
Attachments
(1 file, 2 obsolete files)
Get type information and IDE intellisense hooked up for the following:
Preferencesclass intoolkit/content/preferencesBindings.jsthat is being used inbrowser/components/preferences/main.js- The
Preferenceclass intoolkit/content/preferencesBindings.js - The
Settingclass intoolkit/content/preferencesBindings.js SettingGroupclass inbrowser/components/preferences/widgets/setting-group/setting-group.mjsSettingControlclass inbrowser/components/preferences/widgets/setting-control/setting-control.mjs
The goal is not to use TypeScript to build or emit the types, since these files are being used in a non-TypeScript, JavaScript-based project. Acceptance Criteria:
- Can use Intellisense in any IDE (including VSCode) that supports TypeScript (e.g. hovering over methods of the classes to see their documentation, providing type-hints, autocompletion, etc)
- Can use
tscormach ts checkto run checks on the above files and output errors (we don't necessarily need all errors to pass because there will be a lot, just need for the files to be at least evaluated)
Updated•1 year ago
|
| Assignee | ||
Comment 1•1 year ago
|
||
-
Make Typescript work in VSCode via references, which also addresses performance issues (e.g. slowness of tsserver upon VSCode startup)
-
Include preferenceBindings types in mjs and js files in toolkit and browser directories
-
Move Setting and Preference classes out of Preferences IIFE so they can be referenced in setting-control.mjs and setting-group.mjs files.
-
Ran mach ts paths to generate missing preferencesBindings.js path resolution
-
Enable strict config (mainly to get `strictNullChecks`` to type check possible undefined/null values)
-
Add Lit types in bundle-lit.sh that will get auto-generated with
mach vendorcommand -
Add "lit" that aliases to lit types in toolkit/content/widgets/vendor/lit.all.d.ts to avoid the super long path resolution
Updated•1 year ago
|
Comment 2•1 year ago
|
||
The following patch is waiting for review from an inactive reviewer:
| ID | Title | Author | Reviewer Status |
|---|---|---|---|
| D254993 | Bug 1976049 - Get Settings and Preferences types working r=#recomp-reviewers | mkennedy | mstriemer: Back Jul 21, 2025 |
:mkennedy, could you please find another reviewer?
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 3•1 year ago
|
||
I don't believe we need to land this before :mstriemer (original reviewer) gets back in. So I'll leave keep that person as a reviewer. In the meantime, recomp-reviewers (everyone else on my team) is also marked as a reviewer. So we should be good there.
| Assignee | ||
Updated•1 year ago
|
Updated•1 year ago
|
| Assignee | ||
Comment 4•1 year ago
|
||
| Assignee | ||
Comment 5•1 year ago
|
||
-
Add Lit types in bundle-lit.sh that will get auto-generated with mach vendor command
-
Add "lit" that aliases to lit types in toolkit/content/widgets/vendor/lit.all.d.ts to avoid the super long path resolution
Updated•11 months ago
|
Updated•11 months ago
|
Comment 6•11 months ago
|
||
Comment on attachment 9504973 [details]
Bug 1976049 - Add and use Lit Types r=#recomp-reviewers
Revision D259851 was moved to bug 1989309. Setting attachment 9504973 [details] to obsolete.
Updated•10 months ago
|
| Assignee | ||
Updated•9 months ago
|
Description
•