Skip to content

[codex] fix today top news tag layout - #9

Draft
datehoer wants to merge 1 commit into
mainfrom
codex/fix-today-top-news-tag-layout
Draft

[codex] fix today top news tag layout#9
datehoer wants to merge 1 commit into
mainfrom
codex/fix-today-top-news-tag-layout

Conversation

@datehoer

Copy link
Copy Markdown
Owner

Summary

  • constrain the today-top-news summary dialog header so the category tag keeps a fixed width and the title keeps the remaining space
  • add truncation on long tags and a two-line clamp on titles to prevent long tags from collapsing the headline area
  • remove an unused set import from RankList.vue

Why

The API currently returns some hot_tag values that are much longer than the intended 4-character label. In the existing flex layout, a long tag could grow horizontally and force the headline to become extremely narrow and ellipsized.

Validation

  • npm run build
  • rendered verification against the built dist via Playwright on http://127.0.0.1:4174/
    • observed first dialog item metrics: tagWidth=96, titleWidth=602
    • no relevant console errors during the dialog render

Notes

  • eslint src/views/RankList.vue still reports long-standing style violations across the whole file. Fixing those would require a wholesale file reformat, so this PR keeps the scope to the functional layout bug only.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes an unused import in RankList.vue and refactors the layout of .news-title-group from flexbox to grid, adding text truncation and responsive styling for tags and titles. The feedback suggests wrapping the -webkit-box-orient property with Autoprefixer ignore comments to prevent it from being stripped during production builds.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread ui/src/views/RankList.vue
Comment on lines +707 to +709
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

In many build environments (especially Vue 2 projects using Webpack and Autoprefixer), Autoprefixer will automatically strip the -webkit-box-orient: vertical property during the production build because it considers it redundant or non-standard.

To prevent Autoprefixer from removing this property and breaking the multi-line truncation, you should wrap it with Autoprefixer control comments.

  display: -webkit-box;
  /* autoprefixer: ignore next */
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;

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