Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Add static/classic/amo/installed (whatever they're called) themes

未关闭
#456 5 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
javascript
领域
frontend

调研方向

先阅读 ThemeBuilder 流程以及 issue 中描述的 browser.management API 使用方式,然后跟踪 Firefox Color 当前如何存储和应用主题。在实现 UI 和 state 更改之前,定义静态主题、已安装主题以及所选 override 应如何表示。完成的标准是:已安装的静态主题可以显示、选择、持久化和应用,同时不会让 Firefox Color 主题接管。

由索引模型根据 Issue 内容生成。

描述

Priority: p3

So this comes out of a discussion with the add-ons team, and the idea was that we might collaborate on this issue as a changing of the guard, so to speak. I was noodling around with this the other day, but didn't get very far...here's what i was thinking...certainly open to better suggestions:

  1. Use browser.management api to get all installed themes from the user and track which one they have enabled.
  2. Create a new set of redux actions called statics that can manage the state of static themes. I think we'd need to keep a list of installed static themes, a boolean to track if a static theme should override a ff color theme, and a pointer to user's selected static theme. something like
statics.id: // id of last selected static theme
statics.isActive: // boolean if a static theme should override an FF color API theme
statics.list // list of all static themes the user has installed
  1. On the UI side, create a new panel in the ThemeBuilder that renders all the user's static themes. Something like PaginatedStaticPicker.
  2. There are up to six themes that come from Firefox and do not exist in AMO, these are default, dark, compact light, a stripey pastel theme, the browser renaissance theme, and an outer space theme. For each of these we make representations using our theming JSON schema. For AMO themes, we can do a fetch of the BG image of each using the theme id and use that to make a representation of each AMO Theme.
  3. When a user clicks on one of these themes, we update the app state and override the selected FF color theme. We also pass back a message to browser.management to update to the selected static theme.
  4. Next time FF color starts up, it checks to see if statics.isActive is true before taking over and re-theming based on the current FF color theme state
主要语言
JavaScript
星标
506
派生
100
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

mozilla/FirefoxColor 的其他 Issue

查看 mozilla/FirefoxColor 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。