[604] Refactor footer to use dynamic CMS content - #221
Conversation
VitalyyP
commented
Aug 26, 2025
- replaced comAddress field with companyMission and reorganized footer field structure
- updated SCSS classes from sf-footer__top to sf-footer__mission and improved responsive behavior
- converted hardcoded footer content to dynamic rendering using global module data
🔍 Vulnerabilities of
|
| digest | sha256:2b64e89ccbf5cbd995190f76f73e4f79fd401f23eeb396195833c7d69a6ee4a8 |
| vulnerabilities | |
| platform | linux/amd64 |
| size | 291 MB |
| packages | 984 |
📦 Base Image node:23-alpine
| also known as |
|
| digest | sha256:b9d38d589853406ff0d4364f21969840c3e0397087643aef8eede40edbb6c7cd |
| vulnerabilities |
Description
| ||||||||||||
Description
| ||||||||||||
Description
| ||||||||||||
Description
| ||||||||||||
Description
|
Walkthrough
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. 📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (6)
website/modules/@apostrophecms/global/index.js (2)
100-112: Footer links schema: solid; consider naming consistency.
Implementation mirrors social links and correctly reuses linkSchema. Minor nit: SMLink (camel-cased acronym) vs footerLink (lower camel) is inconsistent. Consider SMLink → socialLink (or footerLink → FooterLink) for consistency across array item keys.
128-129: Reorder footer fields to match rendered order in the template.
In fragments.html, social links render before footer links. Reordering the group improves editor UX by aligning authoring order with display order.Apply this diff:
- fields: ['companyMission', 'footerLinks', 'socialMediaLinks'], + fields: ['companyMission', 'socialMediaLinks', 'footerLinks'],website/modules/asset/ui/src/scss/_footer.scss (2)
26-46: Scope margin-right to the inline layout and keep mobile truly block-level.
Right margin on block paragraphs is unnecessary on mobile and can create accidental horizontal spacing. Move margin-right into the medium breakpoint when paragraphs become inline-block.Apply this diff:
p { font-size: $font-size-footer-mobile; font-weight: $font-weight-300; color: $gray-300; margin: 0; line-height: 120%; display: block; - margin-right: 4px; text-wrap: balance; &:first-child { display: block; } &:not(:first-child) { display: block; @include breakpoint-medium { display: inline-block; + margin-right: 4px; } } }
78-90: Keyboard focus: add a visible focus style.
You already underline on :focus; adding :focus-visible improves clarity for keyboard users without affecting mouse users.Apply this diff:
.sf-footer__links-item { font-size: $font-size-footer-mobile; font-weight: $font-weight-normal; color: $gray-500; text-decoration: none; transition: color 0.2s ease; &:hover, &:focus { color: $gray-400; text-decoration: underline; } + + &:focus-visible { + outline: 2px solid $gray-400; + outline-offset: 2px; + text-decoration: underline; + } }website/views/fragments/fragments.html (2)
43-56: Dynamic social links: good use of target protection; consider optional a11y label.
href resolution and noopener/noreferrer are handled correctly. Optional: wrap this group in a nav with aria-label="Social" for clearer landmarks.Example (no diff required):
…
57-70: Dynamic footer links: consistent with social; same optional a11y improvement applies.
Semantics are fine; you may optionally use a nav with aria-label="Footer links" or a list for assistive tech grouping.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (3)
website/modules/@apostrophecms/global/index.js(3 hunks)website/modules/asset/ui/src/scss/_footer.scss(2 hunks)website/views/fragments/fragments.html(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-05-26T15:57:01.766Z
Learnt from: yuramax
PR: speedandfunction/website#121
File: website/modules/asset/ui/src/scss/_vacancies.scss:99-102
Timestamp: 2025-05-26T15:57:01.766Z
Learning: In website/modules/asset/ui/src/scss/_vacancies.scss, the margin shorthand (e.g., `margin: 0 0 8px`) in `.sf-vacancies_footer h2` is intentionally used to reset all margins and set specific bottom margins, rather than using `margin-bottom` alone. This approach ensures clean baseline styling that doesn't inherit unwanted margins, while still allowing the sibling selector `.vacancy-card + .sf-vacancies_footer h2` to add top margins when a vacancy card precedes the footer.
Applied to files:
website/modules/asset/ui/src/scss/_footer.scss
🧬 Code graph analysis (1)
website/modules/@apostrophecms/global/index.js (2)
website/modules/links-buttons-widget/index.js (1)
linkSchema(2-2)website/modules/buttons-widget/index.js (1)
linkSchema(1-1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: sonarqube
- GitHub Check: lint
- GitHub Check: e2e-tests
- GitHub Check: security-scan
🔇 Additional comments (5)
website/modules/@apostrophecms/global/index.js (1)
75-86: Company mission area looks good; constrained widget set is appropriate.
Using a single rich-text widget with a shared heading toolbar keeps the mission copy tidy and consistent.website/modules/asset/ui/src/scss/_footer.scss (2)
15-25: Mission block centering: LGTM.
fit-content with auto margins is a clean way to center the mission on medium+ without impacting mobile.
15-46: No remaining legacy footer classes found
I’ve searched the entire repository—including SCSS, HTML, JS/JSX, TSX, and Vue files—forsf-footer__topandsf-footer__taglineand found no occurrences. All markup appears to have been migrated to.sf-footer__mission. You can safely remove the old styles and proceed with merging.website/views/fragments/fragments.html (2)
34-41: Mission area: correct conditional rendering.
Area check guards against empty content and aligns with the new .sf-footer__mission structure.
46-51: Confirmed:customUrlis safely sanitized by Apostrophe’s built-in URL field type
Apostrophe’stype: 'url'field automatically “launders” common XSS attack vectors and only permits the following schemes by default:http,https,ftp, andmailto. Any other protocols (includingjavascript:ordata:) are discarded by the sanitizer before rendering (docs.apostrophecms.org)
|


