Volunteer edit: SMS reactivation button gets old Bootstrap classes when Twilio is off
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 75/100
- Issue 类型
- 重构
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- bootstrap, javascript, rails, ruby
- 领域
- frontend
调研方向
从 app/views/volunteers/_manage_active.html.erb 中禁用状态的分支开始,其中短信重新激活按钮会获得 id twilio_disabled。然后阅读 app/javascript/src/sms_reactivation_toggle.js 及其在 app/javascript/application.js 中的 require,在把禁用状态移入视图后,你将删除这个 require。当服务器端渲染的按钮带有 button_classes(:secondary)、disabled 和 aria-disabled="true",并且 bundle exec rspec spec/system/volunteers/edit_spec.rb 通过时,即为完成。
由索引模型根据 Issue 内容生成。
描述
What
On a volunteer's edit page (app/views/volunteers/_manage_active.html.erb), when the org has Twilio turned off, the "Send reactivation alert (SMS)" button gets the id twilio_disabled. Then app/javascript/src/sms_reactivation_toggle.js replaces its classes with old Bootstrap ones (main-btn deactive-btn btn-sm) and adds Bootstrap tooltip attributes. Those styles no longer exist, so the button loses its design-system styling.
Checklist
- In the view, render the disabled state on the server instead: use
button_classes(:secondary)withdisabled/aria-disabled="true"and keep the existingtitletext - Delete
app/javascript/src/sms_reactivation_toggle.jsand itsrequireinapp/javascript/application.js - Compare screenshots before and after, as
[email protected]on a volunteer's edit page with Twilio off for the org (the default in seeds) -
bundle exec rspec spec/system/volunteers/edit_spec.rbpasses
Before you start
- Comment here to be assigned. Setup is
bin/setup, thenbin/dev. Logins are in the README. - JS tests:
npm run test. Lint:bin/lint. - Part of #7301 (removing jQuery). Keep this PR to just this file.
- 主要语言
- Ruby
- 星标
- 382
- 派生
- 547
- 平均合并
- 3 天 3 小时
- 30 天内合并 PR
- 39
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
rubyforgood/casa 的其他 Issue
-
dependencies Difficulty: Easy Good First Issue
难度 1/5 1 小时以内 新手友好度 82/100
rubyforgood/casa#7325 ·
维护者通常 1 天内回复
-
Difficulty: Easy Good First Issue Help Wanted javascript
难度 2/5 1-3 小时 新手友好度 72/100
rubyforgood/casa#7311 ·
维护者通常 1 天内回复
-
Difficulty: Easy Good First Issue Help Wanted javascript
难度 2/5 1-3 小时 新手友好度 78/100
rubyforgood/casa#7310 ·
维护者通常 1 天内回复
-
Difficulty: Easy Good First Issue Help Wanted javascript
难度 2/5 1-3 小时 新手友好度 78/100
rubyforgood/casa#7309 ·
维护者通常 1 天内回复
-
Difficulty: Intermediate Help Wanted javascript
难度 2/5 1-3 小时 新手友好度 75/100
rubyforgood/casa#7307 ·
维护者通常 1 天内回复
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
davidteren/mutineer#364 ·
维护者通常 2 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 10 天内回复