Remove widget render-time dependency on Organization

オープン
#2,173 コメント 1 件 リアクション 0 件 担当者 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分
マージ済み PR(30日)
12

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

GSA/touchpoints のほかの issue

GSA/touchpoints の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。