Skip to content

Fix inconsistent link size and bold values in empty placeholders - #37848

Merged
Rohit0301 merged 7 commits into
mainfrom
Rohit0301/empty-placeholder-font-inconsistency
Nov 16, 2026
Merged

Rohit0301 merged 7 commits into
mainfrom
Rohit0301/empty-placeholder-font-inconsistency

Conversation

@Rohit0301

@Rohit0301 Rohit0301 commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

No linked issue. This was reported directly from the Explore empty state.

In empty placeholders, links rendered at 14px inside 12px text ("See how to get started", "docs"), and interpolated values such as All Domains were bold.

  • Link size. The cause was the legacy unlayered .prose-typography a { font-size: var(--om-font-size-sm); line-height: 21px } rule in fonts.less. It forced every link inside a core Typography to 14px/21px, overriding the layered tw:text-xs. A plain tw:text-xs on the link has no effect: a rule outside a CSS layer beats a layered one regardless of specificity. The rule now uses font-size: inherit; line-height: inherit, so a link matches the text it sits in. Colour, weight and hover/focus colours are unchanged. No core-ui change is needed.
    • Links in 14px text keep their size. Links in 12px text, such as placeholder help, IndexNotFoundBanner, AnnouncementBanner, the version header and CreateMemoryModal, now render at 12px like their text.
  • Bold values. message.no-data-available-entity, message.add-data-asset-domain and message.no-access-placeholder wrapped the value in a <0> slot, which every call site rendered as <b />. I removed the slot from all 20 locale files and switched the 6 call sites to plain t(). These keys are only used in placeholders.
  • Footer size. The Teams sub-teams and Data Insights empty states rendered their "Still need help?" line at 14px under 12px text. They now use the same text-xs footer as Explore, coloured with color="secondary" (Gitar review). The Teams docs link also pointed to the glossary docs; it now points to the teams docs.
  • Other placeholders found in an audit. AccessNotAllowedPage (/unauthorised): the footer message now uses text-xs secondary. DimensionalityTab (Incident Manager): removed the tw:text-sm spans that made the whole description 14px. BotDetailsPage: the bot name no longer renders at a different weight inside the title.

Collate gets these fixes through the shared fonts.less and locale files. Its two PermissionPlaceholder call sites that still pass renderElement={<b />} render plain text once the slot is gone.

Type of change:

  • Bug fix

Tests:

Unit tests

  • SearchEmptyState.test.tsx: the title and description text now sit directly in Typography.
  • AddObservabilityPage.test.tsx: the global t mock drops interpolation values, so this file's mock now echoes the no-access entity. That keeps the create-vs-edit permission assertions meaningful.
  • I ran the related suites locally (SearchEmptyState, EmptyPlaceholder, the Knowledge Center components, ServiceVersionPage, KnowledgeCenterFilterPage, AddObservabilityPage, TeamDetails, TeamsPage, DataInsight, DataInsightPage) and all pass. CI ui-coverage-tests passes.

Backend integration tests

  • Not applicable (no backend API changes).

Visual regression baselines

  • Pending: any baseline that captures a link inside 12px Typography text (placeholders, banners, version header), a bold placeholder value or a docs footer may need a refresh from the Linux visual lane.

Manual testing performed

I ran this branch's UI against a local 2.0 backend, with the fonts.less fix and no core-ui change. For pages where the local data isn't empty, the browser intercepted that page's API and returned an empty list, to force the empty state. On each page I checked that the link's computed font-size equals its parent text's:

# Page Link Link / text
1 Explore, no data (All Domains) See how to get started, docs 12px / 12px
2 Explore → Glossaries tab, no data docs 12px / 12px
3 Explore → Tags tab, no data docs 12px / 12px
4 Table → Queries, no queries docs 12px / 12px
5 Table → Sample Data, empty Auto Classification 12px / 12px
6 Table → Data Observability, profiler not enabled here 12px / 12px
7 Settings → Teams → team with no sub-teams docs 12px / 12px
8 Settings → Bots, empty docs 12px / 12px
9 Settings → Custom Properties → Tables, empty docs 12px / 12px
10 Service → Agents, none Metadata Agents 12px / 12px
11 Data Insights, no data docs 12px / 12px
13 Settings → Users, search with no results Admin page 12px / 12px
14 No access (non-admin opening Add Alert) n/a; permission name no longer bold –
16 Table → Activity Feed (link in 14px text, should be unchanged) user names 14px / 14px
17 Settings → Applications → Data Insights (link in 14px text, should be unchanged) Visit developer website 14px / 14px

UI screen recording:

1. Explore, no data
Explore no data

2. Explore → Glossaries
Explore glossaries

3. Explore → Tags
Explore tags

4. Table → Queries
Table queries

5. Table → Sample Data
Sample data

6. Table → Data Observability (profiler not enabled)
Profiler

7. Team with no sub-teams
Team

8. Bots
Bots

9. Custom Properties
Custom properties

10. Service → Agents
Agents

11. Data Insights
Data insights

13. Users search with no results
Users

14. No access (permission name not bold)
No access

Checklist:

  • I have read the CONTRIBUTING document.
  • I have commented on my code, particularly in hard-to-understand areas.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no actionable new issues were found.

Summary

This PR makes placeholder links match nearby text and removes bold formatting from inserted values.

  • Links in Typography now match the size of their surrounding text.
  • Placeholder names now appear in regular text.
  • Empty-state help footers use compact secondary text and the right docs links.
  • The Incident Manager description uses its surrounding text size.
  • The bot name in the unavailable message uses the title's regular weight.

Reviews (9) · Last reviewed commit: "Drop stale workarounds for the old 14px ..." · Reviewed by Greptile

Links inside EmptyPlaceholder rendered at 14px against 12px copy because the
legacy unlayered `.prose-typography a` rule pins Typography links to 14px.
The shell now makes its links inherit the surrounding font size.

The domain/permission values in the no-data and no-access placeholders were
bolded via a <0> slot rendered as <b>; drop the slot from the strings and use
plain t() so they read in the surrounding weight.
@Rohit0301
Rohit0301 requested a review from a team as a code owner November 16, 2026 07:00
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically.

Maintainers can bypass this check by adding the skip-pr-checks label.

@Rohit0301 Rohit0301 added the safe to test Add this label to run secure Github workflows on PRs label Nov 16, 2026
Target only `.prose-typography a` so link-styled core Buttons in a
placeholder keep their own size. The AddObservabilityPage test now echoes
the no-access entity, which plain t() no longer renders through Trans.
Both footers rendered their docs line at 14px under 12px placeholder copy;
use the same text-xs secondary footer as the Explore empty state. The Teams
docs link also pointed at the glossary docs.
Set the footer text colour through the core Typography `color` prop rather
than a className override, per ADR:2026-10-11-migrated-antd-components-adopt-core-styling.
- AccessNotAllowedPage: footer line uses text-xs secondary like the description.
- DimensionalityTab: drop text-sm spans that made the description 14px.
- BotDetailsPage: bot name no longer renders at a different weight in the title.
The legacy unlayered `.prose-typography a` rule pinned every core Typography
link to 14px/21px, so links in 12px copy (empty-state help text, banners)
rendered larger than their text. Inherit the size and line height instead,
and drop the EmptyPlaceholderShell override that worked around it.
- activityVerb: the link now inherits the text-xs sentence, so drop tw:text-xs!.
- CommonEntitySummaryInfoV1, TaskDetailPanel: the rule still sets link colour
  and weight, so keep the workarounds and correct their comments.
@gitar-bot

gitar-bot Bot commented Nov 16, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 🟡 Medium risk 2 closed / 2 findings

Changing global Typography link sizing to inherit could alter link dimensions and layout across pages that previously relied on the fixed 14px rule.

Fixes placeholder link sizing by making Typography links inherit font size and line height from surrounding text, and removes bold styling from interpolated values in empty-state messages. Two prior findings were resolved: the !important descendant link rule that also restyled core Button links, and text colour set via className on core Typography instead of the color prop. No issues found.

✅ 2 closed
✅ Edge Case: !important descendant a rule also restyles core Button links

📄 openmetadata-ui-core-components/src/main/resources/ui/src/components/application/empty-placeholder/empty-placeholder-shell.tsx:122-124
tw:[&_a]:[font-size:inherit]! tw:[&_a]:[line-height:inherit]! matches every <a> under the shell, not just inline copy links. A core Button given href renders as a React Aria Link (an <a>, button.tsx), so its tw:text-sm and line-height are overridden with !important too. One example is WidgetEmptyState, which puts <Button href={actionButtonLink} size="sm"> in the placeholder footer, right next to an onPress Button. The link button then takes the host's font size and line height, and the two buttons, which are supposed to look the same, end up with different text metrics and heights. The fix is to target only the links that the .prose-typography a rule pins, or to leave out the anchors React Aria renders.

✅ Quality: Text colour set via className on core Typography instead of color prop

📄 openmetadata-ui/src/main/resources/ui/src/components/Settings/Team/TeamDetails/TeamDetailsV1.tsx:741 📄 openmetadata-ui/src/main/resources/ui/src/components/DataInsight/EmptyGraphPlaceholder.tsx:36
Both new placeholder footers use <Typography as="p" className="tw:text-secondary" size="text-xs">. That sets text colour on a core component through className, which the Accepted record ADR:2026-10-11-migrated-antd-components-adopt-core-styling forbids: "no className or style that sets … text colour on the core component… Use the component's props (variant, color, size)". Typography already has a color prop, and the codebase uses <Typography color="secondary" size="text-xs"> in places like CommentComposer.tsx and CreateMemoryModal.component.tsx. Use that prop here as well.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@Rohit0301
Rohit0301 enabled auto-merge (squash) November 16, 2026 12:01
@Rohit0301
Rohit0301 disabled auto-merge November 16, 2026 12:08
@Rohit0301
Rohit0301 merged commit 406ab09 into main Nov 16, 2026
55 of 57 checks passed
@Rohit0301
Rohit0301 deleted the Rohit0301/empty-placeholder-font-inconsistency branch November 16, 2026 12:08
Rohit0301 added a commit that referenced this pull request Nov 16, 2026
…kport 2.1 #37848) (#37894)

- Make `.prose-typography a` inherit font size and line height instead of
  pinning 14px/21px, so Typography links match the text they sit in.
- Drop the bold <0> slot from no-data-available-entity, add-data-asset-domain
  and no-access-placeholder, and render them with plain t().
- Size the Teams and Data Insights placeholder footers to text-xs with the
  Typography color prop; point the Teams docs link at the teams docs.
- Align AccessNotAllowedPage, DimensionalityTab and BotDetailsPage copy.
- Drop the stale 14px workaround in activityVerb and correct two comments.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants