Skip to content

feat(ui)!: bake social icons and disclaimer into OpenFooter#24

Merged
rlueder merged 2 commits intomainfrom
feat/open-footer-bake-in-socials-and-disclaimer
Apr 23, 2026
Merged

feat(ui)!: bake social icons and disclaimer into OpenFooter#24
rlueder merged 2 commits intomainfrom
feat/open-footer-bake-in-socials-and-disclaimer

Conversation

@rlueder
Copy link
Copy Markdown
Member

@rlueder rlueder commented Apr 23, 2026

Summary

The three OSS sites (fhir-brasil, medbench-brasil, datasus-brasil) currently duplicate the same GitHub/npm SVG icons and the same medical/research disclaimer copy in their local `Footer.tsx` files. Move those into `OpenFooter` itself so consumers stop copy-pasting them.

  • Icons (GitHub, npm) are rendered directly inside `OpenFooter`.
  • Disclaimer copy is a constant inside the component.
  • Per-project URLs stay configurable via new discrete props: `githubUrl` (required), `npmUrl` (optional — omit for projects without an npm package yet, e.g. datasus-brasil).

Breaking change

Removes `socials` and `disclaimer` props, plus the `OpenFooterSocial` type export. Consumer migration:

```diff
-<OpenFooter

  • brand={{ ... }}
  • disclaimer="Este software é fornecido ..."
  • socials={[
  • { href: '...', icon: , label: 'GitHub' },
  • { href: '...', icon: , label: 'npm' },
  • ]}
    -/>
    +<OpenFooter

semantic-release will cut a major (2.0.0). Follow-ups in fhir-brasil and medbench-brasil will bump `@precisa-saude/ui` and simplify their `Footer.tsx` in the same PR.

Test plan

  • `pnpm turbo run build --filter=@precisa-saude/ui` passes
  • Local patch into fhir-brasil and medbench-brasil dev servers; footer renders correctly with the slim API
  • CI verde

The three OSS sites (fhir-brasil, medbench-brasil, datasus-brasil) ship
identical GitHub/npm icons and the same medical/research disclaimer in
their footers. Keep those in the component itself so consumers stop
duplicating SVG paths and disclaimer copy across repos.

Icons and disclaimer copy are now baked in. Per-project URLs stay
configurable via new discrete props:

- \`githubUrl\` (required) — repository URL.
- \`npmUrl\` (optional) — npm package or org URL; omit for projects that
  don't publish to npm yet (e.g. datasus-brasil).

BREAKING CHANGE: OpenFooter no longer accepts \`socials\` or
\`disclaimer\` props; the \`OpenFooterSocial\` type is removed.

Migration for consumers:

\`\`\`diff
-<OpenFooter
-  brand={{ ... }}
-  disclaimer="Este software é fornecido ..."
-  socials={[
-    { href: 'https://github.com/...', icon: <GitHubSvg />, label: 'GitHub' },
-    { href: 'https://www.npmjs.com/...', icon: <NpmSvg />, label: 'npm' },
-  ]}
-/>
+<OpenFooter
+  brand={{ ... }}
+  githubUrl="https://github.com/Precisa-Saude/<repo>"
+  npmUrl="https://www.npmjs.com/package/@precisa-saude/<pkg>"
+/>
\`\`\`
@github-actions
Copy link
Copy Markdown

Automated Review — Round 1

Summary

The PR introduces significant changes to the OpenFooter component, including the removal of social links and the addition of GitHub and npm links. However, there are potential security and functionality issues regarding the handling of URLs and the usage of keys in the elements.

Changes

  • Removed OpenFooterSocial interface
  • Added GitHub and npm link handling

🔍 Found 2 suggestions (see inline comments)

Reviewed by OpenAI gpt-4o-mini (fallback) | 2,372 in / 209 out | $0.0005 — Round 1 of 2

Comment thread packages/ui/src/layout/OpenFooter.tsx
Comment thread packages/ui/src/layout/OpenFooter.tsx
The key={href} inside SocialLink was a leftover from the previous
loop-based render; in the current OpenFooter layout SocialLink is used
twice statically, so the key serves no purpose.

Refs: #24
@github-actions
Copy link
Copy Markdown

Automated Review — Round 2 (Final)

Summary

Removed key prop from SocialLink component which might cause rendering issues in a list context.

Changes

  • Removed key={href} from SocialLink component

🔍 Found 1 suggestion (see inline comments)

Reviewed by OpenAI gpt-4o-mini (fallback) | 357 in / 136 out | $0.0001 — Round 2 (Final); no further reviews will be performed

Comment thread packages/ui/src/layout/OpenFooter.tsx
@rlueder rlueder merged commit e7aef06 into main Apr 23, 2026
8 checks passed
@rlueder rlueder deleted the feat/open-footer-bake-in-socials-and-disclaimer branch April 23, 2026 14:07
github-actions Bot pushed a commit that referenced this pull request Apr 23, 2026
## [1.6.0](v1.5.1...v1.6.0) (2026-04-23)

### ⚠ BREAKING CHANGES

* **ui:** OpenFooter no longer accepts \`socials\` or
\`disclaimer\` props; the \`OpenFooterSocial\` type is removed.

Migration for consumers:

\`\`\`diff
-<OpenFooter
-  brand={{ ... }}
-  disclaimer="Este software é fornecido ..."
-  socials={[
-    { href: 'https://github.com/...', icon: <GitHubSvg />, label: 'GitHub' },
-    { href: 'https://www.npmjs.com/...', icon: <NpmSvg />, label: 'npm' },
-  ]}
-/>
+<OpenFooter
+  brand={{ ... }}
+  githubUrl="https://github.com/Precisa-Saude/<repo>"
+  npmUrl="https://www.npmjs.com/package/@precisa-saude/<pkg>"
+/>
\`\`\`

* refactor(ui): drop stale key prop from SocialLink

The key={href} inside SocialLink was a leftover from the previous
loop-based render; in the current OpenFooter layout SocialLink is used
twice statically, so the key serves no purpose.

### Features

* **ui:** bake social icons and disclaimer into OpenFooter ([#24](#24)) ([e7aef06](e7aef06))
rlueder added a commit that referenced this pull request Apr 24, 2026
* feat(ui)!: bake social icons and disclaimer into OpenFooter

The three OSS sites (fhir-brasil, medbench-brasil, datasus-brasil) ship
identical GitHub/npm icons and the same medical/research disclaimer in
their footers. Keep those in the component itself so consumers stop
duplicating SVG paths and disclaimer copy across repos.

Icons and disclaimer copy are now baked in. Per-project URLs stay
configurable via new discrete props:

- \`githubUrl\` (required) — repository URL.
- \`npmUrl\` (optional) — npm package or org URL; omit for projects that
  don't publish to npm yet (e.g. datasus-brasil).

BREAKING CHANGE: OpenFooter no longer accepts \`socials\` or
\`disclaimer\` props; the \`OpenFooterSocial\` type is removed.

Migration for consumers:

\`\`\`diff
-<OpenFooter
-  brand={{ ... }}
-  disclaimer="Este software é fornecido ..."
-  socials={[
-    { href: 'https://github.com/...', icon: <GitHubSvg />, label: 'GitHub' },
-    { href: 'https://www.npmjs.com/...', icon: <NpmSvg />, label: 'npm' },
-  ]}
-/>
+<OpenFooter
+  brand={{ ... }}
+  githubUrl="https://github.com/Precisa-Saude/<repo>"
+  npmUrl="https://www.npmjs.com/package/@precisa-saude/<pkg>"
+/>
\`\`\`

* refactor(ui): drop stale key prop from SocialLink

The key={href} inside SocialLink was a leftover from the previous
loop-based render; in the current OpenFooter layout SocialLink is used
twice statically, so the key serves no purpose.

Refs: #24
rlueder pushed a commit that referenced this pull request Apr 24, 2026
## [1.6.0](v1.5.1...v1.6.0) (2026-04-23)

### ⚠ BREAKING CHANGES

* **ui:** OpenFooter no longer accepts \`socials\` or
\`disclaimer\` props; the \`OpenFooterSocial\` type is removed.

Migration for consumers:

\`\`\`diff
-<OpenFooter
-  brand={{ ... }}
-  disclaimer="Este software é fornecido ..."
-  socials={[
-    { href: 'https://github.com/...', icon: <GitHubSvg />, label: 'GitHub' },
-    { href: 'https://www.npmjs.com/...', icon: <NpmSvg />, label: 'npm' },
-  ]}
-/>
+<OpenFooter
+  brand={{ ... }}
+  githubUrl="https://github.com/Precisa-Saude/<repo>"
+  npmUrl="https://www.npmjs.com/package/@precisa-saude/<pkg>"
+/>
\`\`\`

* refactor(ui): drop stale key prop from SocialLink

The key={href} inside SocialLink was a leftover from the previous
loop-based render; in the current OpenFooter layout SocialLink is used
twice statically, so the key serves no purpose.

### Features

* **ui:** bake social icons and disclaimer into OpenFooter ([#24](#24)) ([8d322d2](8d322d2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant