fix:(tiny-vue): modify ui style#124
Conversation
…#6) * feat: 新增四个产品的首页 * feat: Implement new home pages for TinyVue, TinyRobot, AI Extension, and Next SDKs, including routing, header navigation, and Prettier setup. * feat: add home pages for NEXT-SDKs, TinyRobot, TinyVue, and AI Extension * feat: Add header navigation configuration with product links and icons. * feat: Add initial OpenTiny Vue homepage with hero, feature sections, and AI-powered UI details.
* feat: add carousel in home * fix: Fix style and other issues * fix: remove invalid "target=_blank"
* feat: add carousel in home * fix: Fix style and other issues * fix: remove invalid "target=_blank" * feat: Complete the development of homepage carousel (mobile+PC) * chore: Add type declaration * fix: Block button bubbling to prevent two jumps when clicked * chore: Add optional links for video ref to prevent control value errors
* feat: add carousel in home * fix: Fix style and other issues * fix: remove invalid "target=_blank" * feat: Complete the development of homepage carousel (mobile+PC) * chore: Add type declaration * fix: Block button bubbling to prevent two jumps when clicked * chore: Add optional links for video ref to prevent control value errors * docs: fix Opentiny -> OpenTiny * feat: The anchor point is only displayed below the carousel * chore: Adapt carousel to different widths
* fix: adapt to header * fix: adjust spacing * fix: delete code * fix: modify height
#104) * feat(genui-sdk-home): add GenUI startup documents & update GenUI submodules * feat(genui-sdk-home): add GenUI startup documents & update GenUI submodules
* feat: fix genui-sdk submodule build errror * feat: update submodule commit * feat: pnpm install * feat: update build script * feat: update home build workflow * feat: update genui-sdk homepage build script
* feat: update job information * feat: update job information
…tation base URL in workflow (#119)
|
Warning Review limit reached
Your plan includes 1 review of capacity. Refill in 6 minutes and 41 seconds. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more review capacity refills, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughUpdates typography styles and spacing utilities in the common stylesheet, then refactors six view components to use standardized CSS classes for consistent feature titles, descriptions, layout, and responsive behavior across the Tiny-Vue home page. ChangesTypography & Utilities Foundation
Component Styling Refactors
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~35 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/home/src/views/tiny-vue-home/components/ComponentShowcase.vue (1)
122-122:⚠️ Potential issue | 🟡 Minor
feature-text-titleis an undefined class — remove it from both locations.The
feature-text-titleclass is referenced at lines 122 and 129 but has no CSS definition anywhere in the codebase. It should be removed:Suggested fix
- <div class="title feature-text-title title-number">130+</div> + <div class="title title-number">130+</div> ... - <div class="title feature-text-title title-number">30+</div> + <div class="title title-number">30+</div>🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/home/src/views/tiny-vue-home/components/ComponentShowcase.vue` at line 122, The class name "feature-text-title" is unused/undefined; remove it from the two JSX/HTML elements that reference it (the div with class "title feature-text-title title-number" and the other occurrence at the second title block) so they only use the remaining valid classes (e.g., "title" and "title-number"/other existing classes) and update any tests or snapshots if they depend on that exact class name; search for "feature-text-title" to ensure both occurrences are removed.
🧹 Nitpick comments (3)
packages/home/src/views/tiny-vue-home/common.less (2)
125-127: Minor formatting nit on.mb-40.The selector
.mb-40has a stray leading space and lost one indent level relative to its siblings (.mb-60,.mb-70,.mb-100). Functionally harmless, but worth aligning for consistency.♻️ Suggested tweak
- .mb-40 { + .mb-40 { margin-bottom: 40px; }While here, you may also want to clean up a couple of small whitespace inconsistencies introduced in this file:
- Line 13:
line-height:54px;— missing space after the colon.- Lines 134 and 138:
padding: 16px 32px 40px;/padding: 0px 32px;— double space after the colon.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/home/src/views/tiny-vue-home/common.less` around lines 125 - 127, Remove the stray leading space and restore the same indentation for the .mb-40 selector so it matches its sibling selectors (.mb-60, .mb-70, .mb-100); also normalize whitespace in this stylesheet by adding a space after the colon in the line-height declaration (change line-height:54px; to line-height: 54px;) and by collapsing the double spaces after the colon in the padding declarations (padding: 16px 32px 40px; and padding: 0px 32px; should be padding: 16px 32px 40px; and padding: 0px 32px;).
97-147: Optional: consider a consistent spacing scale rather than ad‑hoc utilities.You're growing a small set of one‑off margin/padding utilities (
mt-20/40/60/70/100,mb-40/60/70/100,pb-100/130,pd-space*). It works, but if these end up referenced from many components it can quickly drift. A simple Less mixin or a small spacing scale (@space-1: 20px;@SpACE-2: 40px; …) would be easier to keep consistent across responsive breakpoints. Non‑blocking.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/home/src/views/tiny-vue-home/common.less` around lines 97 - 147, The file defines many ad-hoc spacing utilities (.mt-20/.mt-40/.mt-60/.mt-70/.mt-100, .mb-40/.mb-60/.mb-70/.mb-100, .pb-100/.pb-130, .pd-space, .pd-space-title) which should be consolidated into a consistent spacing scale; introduce Less variables (e.g. `@space-1`: 8px; `@space-2`: 16px; `@space-3`: 24px; `@space-4`: 40px; `@space-5`: 100px) or a mixin (e.g. .space(`@top`; `@right`; `@bottom`; `@left`) { margin: `@top` `@right` `@bottom` `@left`; }) and replace the literal values in the classes (.mt-*, .mb-*, .pb-*, .pd-space, .pd-space-title) to use those variables/mixins so spacing is consistent and easier to update across components.packages/home/src/views/tiny-vue-home/components/CrossPlatformFeature.vue (1)
30-32: Drop the legacydescriptionclass on the header<p>.You've introduced
feature-sub-titleas the new style, but the header<p>still carries the olddescriptionclass. They mostly conflict (font‑size, line‑height, color, padding, letter‑spacing) andfeature-sub-titlehappens to win because it's defined later incommon.less, butdescription's responsive rules still leak through — e.g.@media (max-width: 480px)incommon.lessaddspadding-left/right: 15pxand afont-size: 16pxto.description, which competes with the new.feature-sub-title480px rule. Easy to clean up:♻️ Suggested change
- <p class="description feature-sub-title text-center"> + <p class="feature-sub-title text-center"> 相同的组件代码可在不同的Vue版本和设备平台上运行,显著降低了企业应用的维护成本,无需重复开发,大幅提升开发效率 </p>Same pattern exists on:
ThemeCustomization.vueline 17ComponentShowcase.vueline 115McpSection.vueline 71It would be worth applying the same simplification there for consistency.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/home/src/views/tiny-vue-home/components/CrossPlatformFeature.vue` around lines 30 - 32, Remove the legacy "description" class from the header <p> in CrossPlatformFeature.vue so only the new "feature-sub-title" class is applied (this prevents conflicting responsive rules like .description `@media` overrides). Locate the paragraph element with class="description feature-sub-title" and change it to only class="feature-sub-title"; repeat the same cleanup in ThemeCustomization.vue (header <p> at the noted spot), ComponentShowcase.vue (the paragraph around line where "feature-sub-title" appears), and McpSection.vue to ensure no .description class remains alongside .feature-sub-title.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/home/src/views/tiny-vue-home/components/ConfigArchitecture.vue`:
- Around line 84-90: The img rule uses width: stretch which has inconsistent
support; make it defensive by providing fallbacks and/or feature-detection: set
a baseline width (e.g., 100%) first, then add vendor-prefixed fallback
(-webkit-fill-available) and finally width: stretch, or wrap the
-webkit-fill-available/ stretch assignments inside `@supports` blocks; update the
CSS rule for the img selector in ConfigArchitecture.vue so the order/@supports
ensures Safari and older browsers get the fallback while modern browsers use
stretch.
---
Outside diff comments:
In `@packages/home/src/views/tiny-vue-home/components/ComponentShowcase.vue`:
- Line 122: The class name "feature-text-title" is unused/undefined; remove it
from the two JSX/HTML elements that reference it (the div with class "title
feature-text-title title-number" and the other occurrence at the second title
block) so they only use the remaining valid classes (e.g., "title" and
"title-number"/other existing classes) and update any tests or snapshots if they
depend on that exact class name; search for "feature-text-title" to ensure both
occurrences are removed.
---
Nitpick comments:
In `@packages/home/src/views/tiny-vue-home/common.less`:
- Around line 125-127: Remove the stray leading space and restore the same
indentation for the .mb-40 selector so it matches its sibling selectors (.mb-60,
.mb-70, .mb-100); also normalize whitespace in this stylesheet by adding a space
after the colon in the line-height declaration (change line-height:54px; to
line-height: 54px;) and by collapsing the double spaces after the colon in the
padding declarations (padding: 16px 32px 40px; and padding: 0px 32px; should
be padding: 16px 32px 40px; and padding: 0px 32px;).
- Around line 97-147: The file defines many ad-hoc spacing utilities
(.mt-20/.mt-40/.mt-60/.mt-70/.mt-100, .mb-40/.mb-60/.mb-70/.mb-100,
.pb-100/.pb-130, .pd-space, .pd-space-title) which should be consolidated into a
consistent spacing scale; introduce Less variables (e.g. `@space-1`: 8px;
`@space-2`: 16px; `@space-3`: 24px; `@space-4`: 40px; `@space-5`: 100px) or a mixin
(e.g. .space(`@top`; `@right`; `@bottom`; `@left`) { margin: `@top` `@right` `@bottom` `@left`;
}) and replace the literal values in the classes (.mt-*, .mb-*, .pb-*,
.pd-space, .pd-space-title) to use those variables/mixins so spacing is
consistent and easier to update across components.
In `@packages/home/src/views/tiny-vue-home/components/CrossPlatformFeature.vue`:
- Around line 30-32: Remove the legacy "description" class from the header <p>
in CrossPlatformFeature.vue so only the new "feature-sub-title" class is applied
(this prevents conflicting responsive rules like .description `@media` overrides).
Locate the paragraph element with class="description feature-sub-title" and
change it to only class="feature-sub-title"; repeat the same cleanup in
ThemeCustomization.vue (header <p> at the noted spot), ComponentShowcase.vue
(the paragraph around line where "feature-sub-title" appears), and
McpSection.vue to ensure no .description class remains alongside
.feature-sub-title.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 689faa5d-99d3-47b5-8424-36aa6aceff55
📒 Files selected for processing (6)
packages/home/src/views/tiny-vue-home/common.lesspackages/home/src/views/tiny-vue-home/components/ComponentShowcase.vuepackages/home/src/views/tiny-vue-home/components/ConfigArchitecture.vuepackages/home/src/views/tiny-vue-home/components/CrossPlatformFeature.vuepackages/home/src/views/tiny-vue-home/components/McpSection.vuepackages/home/src/views/tiny-vue-home/components/ThemeCustomization.vue
45933c0 to
321eb17
Compare
Summary by CodeRabbit