Skip to content

fix: Optimize tiny-engine official website UI#79

Merged
hexqi merged 8 commits intodevfrom
lx/fix-helpOptimization
Feb 10, 2026
Merged

fix: Optimize tiny-engine official website UI#79
hexqi merged 8 commits intodevfrom
lx/fix-helpOptimization

Conversation

@xuanlid
Copy link
Collaborator

@xuanlid xuanlid commented Feb 5, 2026

  1. video 播放图片不展示
  2. 更改图片
  3. 调整间距等UI检视问题
  4. 增加加载设计器时Loading
image

Summary by CodeRabbit

  • New Features

    • Added an integrated loading indicator when visiting embedded applications to show progress until content is ready.
  • Chores

    • Use a dynamic base URL for image resources to improve portability.
  • Style

    • Refined video card layout: added positioning context, centered the play overlay, and removed offset positioning for better alignment.
    • Disabled play-icon animation for a stable visual.
    • Increased vertical padding on the home top banner and slightly reduced description font size.
    • Added vertical padding to the first-screen layout with mobile-specific adjustments.

@coderabbitai
Copy link

coderabbitai bot commented Feb 5, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.
  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Replaced hardcoded help overlay image path with state.imgPre, adjusted video overlay CSS and disabled inner image animation, increased HomeTop banner vertical padding and reduced description font-size, added FirstScreen wrapper padding with mobile reset, and added an iframe loading overlay using Loading.service in ApplicationVisit.vue.

Changes

Cohort / File(s) Summary
Help Home — overlay & assets
packages/tiny-engine-portal/src/help/home/Main.vue
Replaced /img/help/playing${(index % 3) + 1}.svg with ${state.imgPre}img/help/playing${(index % 3) + 1}.svg; added position: relative to .video-content; removed position: relative from .video-overlay; made .video-overlay-bottom-start absolutely centered (top:50%,left:50%,transform: translate(-50%,-50%)); preserved hover show/hide; disabled inner img animation in desktop and mobile rules.
Home top banner — spacing & typography
packages/tiny-engine-portal/src/home/HomeTop.vue
Increased .home-top-banner padding-top/padding-bottom from 80px to 90px; reduced .description font-size from 20px to 18px.
First screen — vertical spacing
packages/home/src/views/tiny-robot-home/FirstScreen.vue
Added vertical padding to .first-screen-wrap (padding-top: 120px, padding-bottom: 130px) and removed previous image top/bottom margins; mobile breakpoint resets wrapper padding to 0.
Application visit — iframe loading flow
packages/tiny-engine-portal/src/application/ApplicationVisit.vue
Wrapped iframe in a container with a #loading element; imported ref and Loading and introduced loadingInstance ref; start Loading.service in onMounted targeting #loading, attach iframe.onload to hide loading and show iframe; added container/loader CSS height adjustments and minor event-listener formatting.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant AppComponent as ApplicationVisit
  participant Loader as Loading.service
  participant IFrame as iframe

  User->>AppComponent: navigates to visit page
  AppComponent->>Loader: start loading (target `#loading`)
  AppComponent->>IFrame: set src / insert iframe (hidden)
  IFrame-->>AppComponent: load event fires
  AppComponent->>Loader: close loading
  AppComponent->>IFrame: show iframe
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 I nudged the paths and trimmed the space,
A centered play, a gentler face,
Padding stretched and fonts grew mild,
I watched the frame wake, meek and styled,
A tiny hop — the UI smiled 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The PR title 'fix: Optimize tiny-engine official website UI' is vague and overly broad, using non-descriptive terms like 'Optimize' that don't convey the specific changes made across multiple Vue components. Consider a more specific title that reflects the main changes, such as 'fix: Refactor image paths and layout styles across portal components' or focus on the primary change if there is one.
✅ Passed checks (2 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch lx/fix-helpOptimization

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@packages/tiny-engine-portal/src/application/ApplicationVisit.vue`:
- Around line 2-5: The iframe is not hidden initially so the loading overlay
doesn't mask it; update the initial state by hiding the iframe (element with
class tiny-engine-iframe) until its onload handler runs — either set its inline
style to display: none in the template or add a CSS rule for .tiny-engine-iframe
{ display: none; } and let the existing onload handler (the function that
currently sets display: 'block') reveal it; ensure the loading element (id
"loading") stays visible until the iframe is shown.
- Around line 36-44: The code creates a Loading.service instance assigned to
loadingInstance.value but never closes it; change the iframe onload handler to
call loadingInstance.value.close() (instead of manually hiding the DOM element)
and then set the iframe display if needed. Locate the Loading.service usage
(loadingInstance) and the iframe onload assignment
(document.querySelector('iframe').onload) and replace the DOM hide call with a
call to loadingInstance.value.close() to properly clean up the service instance.
🧹 Nitpick comments (2)
packages/tiny-engine-portal/src/application/ApplicationVisit.vue (2)

33-34: Use a template ref instead of document.querySelector('iframe').

Multiple bare querySelector('iframe') calls are fragile — they'll match the first iframe in the document, which may not be this one if the page structure changes. A Vue template ref (ref="iframeRef") is safer and idiomatic.

Proposed refactor

In the template:

-    <iframe class="tiny-engine-iframe" :src="tinyEngineUrl"></iframe>
+    <iframe ref="iframeRef" class="tiny-engine-iframe" :src="tinyEngineUrl" style="display: none"></iframe>

In setup:

+ const iframeRef = ref(null)

In onMounted:

- const iframe = document.querySelector('iframe')
- iframe.src = `${TINY_ENGINE_DESIGNER_URL}?${type}`
+ iframeRef.value.src = `${TINY_ENGINE_DESIGNER_URL}?${type}`
  ...
- document.querySelector('iframe').onload = function () {
-   document.querySelector('iframe').style.display = 'block'
+ iframeRef.value.onload = function () {
+   iframeRef.value.style.display = 'block'

And return iframeRef from setup.

Also applies to: 41-43


29-35: Inconsistent indentation inside onMounted.

Lines 32–35 have an extra level of indentation compared to lines 30–31, though they're at the same logical scope.

kagol
kagol previously approved these changes Feb 9, 2026
@xuanlid xuanlid changed the title fix: Modify tiny-engine-portal helpCenter img fix: Optimize the official website UI Feb 10, 2026
@xuanlid xuanlid changed the title fix: Optimize the official website UI fix: Optimize tiny-engine official website UI Feb 10, 2026
@hexqi hexqi merged commit 1356321 into dev Feb 10, 2026
8 checks passed
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.

3 participants