Remove widget render-time dependency on Organization

Đang mở
#2,173 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@Tirth00000 đang làm issue này rồi.

Từ ngày 8/11/2026.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript
Lĩnh vực
backend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
JavaScript
Star
73
Fork
38
Merge trung bình
14 giờ 53 phút
Pull request đã merge (30 ngày)
12

Chuẩn bị môi trường

  • Có Dockerfile hoặc tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của GSA/touchpoints

Tất cả issue của GSA/touchpoints

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.