Remove widget render-time dependency on Organization

未关闭
#2,173 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@Tirth00000 已经在做这个了。

开始于 2026年11月8日。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
重构
描述清晰度
基本清楚
活跃度
活跃
技术栈
javascript
领域
backend

调研方向

Read the widget rendering code that supplies the default logo_alt_text and the cache invalidation code in organization.rb. Trace how organization names populate logo alt text and how organization changes invalidate form widget caches; decide whether a data migration is needed for existing null values. Done means rendering no longer depends on Organization and the organization cache invalidation code is removed.

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

描述

https://github.com/GSA/touchpoints/pull/2165 introduces caching of rendered widget JS code. To simplify the cache invalidation logic and reduce the frequency of invalidations, we'd like the rendered widget to depend on as few model objects as possible. Currently, it depends on:

  • Form
  • FormSection
  • Question
  • QuestionOption
  • Organization

The Organization dependency is expensive since, if an Org changes, we have to invalidate the cache for all forms associated with the Org. It's also probably unnecessary, since it's only used to provide a default alt text for forms with a logo. We should:

  1. Remove the render-time default value for logo_alt_text.
  2. Possibly do a data migration to fill any null logo_alt_text columns with the Org name.

Then, we can remove the cache invalidation code from organization.rb.

主要语言
JavaScript
星标
73
派生
38
平均合并
14 小时 53 分钟
30 天内合并 PR
12

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 没有贡献指南

从这里开始

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

GSA/touchpoints 的其他 Issue

查看 GSA/touchpoints 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

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