Skip to content

docs: jmapp 不判断环境,直接打开#3193

Merged
Miles-hxy merged 1 commit intojdf2e:feat_v3.xfrom
oasis-cloud:fix_jmapp-theme-demo
Apr 21, 2025
Merged

docs: jmapp 不判断环境,直接打开#3193
Miles-hxy merged 1 commit intojdf2e:feat_v3.xfrom
oasis-cloud:fix_jmapp-theme-demo

Conversation

@oasis-cloud
Copy link
Collaborator

@oasis-cloud oasis-cloud commented Apr 21, 2025

Summary by CodeRabbit

  • 文档
    • 官方主题表中“京东 JMAPP 主题”新增可点击预览链接,并更新了预览地址。
  • 修复
    • 优化了非移动端用户的跳转逻辑,避免在路径包含“jmapp”时发生跳转。

@coderabbitai
Copy link

coderabbitai bot commented Apr 21, 2025

Walkthrough

此次更改主要涉及移动端主入口文件的重定向逻辑优化,以及官方主题文档中京东 JMAPP 主题的预览链接更新。代码层面,新增了对路径中包含“jmapp”时不进行重定向的条件。文档层面,将主题预览链接统一调整为新的 demo 路径,并在英文文档中增加了可点击的预览链接。

Changes

文件路径 变更摘要
src/sites/mobile/main.tsx 优化非移动端用户的重定向逻辑,新增当路径包含“jmapp”时不重定向。
src/sites/sites-react/doc/docs/react/official-theme-react.en-US.md
src/sites/sites-react/doc/docs/react/official-theme-react.md
更新“京东 JMAPP 主题”预览链接,英文文档增加了可点击的预览入口。

Suggested reviewers

  • xiaoyatong

Poem

🐰
跳跳小兔敲代码,
重定向逻辑巧加筛,
JMAPP 主题新链接,
文档预览更明白。
一行一改皆用心,
代码世界乐开怀!

✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@oasis-cloud oasis-cloud requested a review from Miles-hxy April 21, 2025 02:28
@github-actions github-actions bot added action:review This PR needs more reviews (less than 2 approvals) 3.x Target branch 3.x labels Apr 21, 2025
@codecov
Copy link

codecov bot commented Apr 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.47%. Comparing base (8ddee7c) to head (508916c).
Report is 1 commits behind head on feat_v3.x.

Additional details and impacted files
@@              Coverage Diff              @@
##           feat_v3.x    #3193      +/-   ##
=============================================
- Coverage      86.52%   86.47%   -0.05%     
=============================================
  Files            289      289              
  Lines          18725    18725              
  Branches        2818     2817       -1     
=============================================
- Hits           16202    16193       -9     
- Misses          2518     2527       +9     
  Partials           5        5              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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: 0

🧹 Nitpick comments (1)
src/sites/sites-react/doc/docs/react/official-theme-react.en-US.md (1)

12-12: 预览链接添加成功

英文文档中成功添加了可点击的预览链接,与中文文档保持一致,提升了文档的使用体验。

另外,Markdown 格式中存在一个小问题:`variables-jmapp.scss ` 在结束反引号前有一个额外的空格,建议移除此空格以符合 Markdown 规范。

-| Jingdong JMAPP Theme([Preview](https://nutui.jd.com/h5/react/jmapp-3x/demo.html#/zh-CN/component/Button)) | `variables-jmapp.scss ` |
+| Jingdong JMAPP Theme([Preview](https://nutui.jd.com/h5/react/jmapp-3x/demo.html#/zh-CN/component/Button)) | `variables-jmapp.scss` |
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

12-12: Spaces inside code span elements
null

(MD038, no-space-in-code)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8ddee7c and 508916c.

📒 Files selected for processing (3)
  • src/sites/mobile/main.tsx (1 hunks)
  • src/sites/sites-react/doc/docs/react/official-theme-react.en-US.md (1 hunks)
  • src/sites/sites-react/doc/docs/react/official-theme-react.md (1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
src/sites/sites-react/doc/docs/react/official-theme-react.en-US.md

12-12: Spaces inside code span elements
null

(MD038, no-space-in-code)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: build
  • GitHub Check: test
🔇 Additional comments (2)
src/sites/sites-react/doc/docs/react/official-theme-react.md (1)

12-12: 预览链接已更新

将京东 JMAPP 主题的预览链接更新为指向 demo.html 地址,确保用户能直接访问组件预览页面。这与移动端重定向逻辑的变更相匹配。

src/sites/mobile/main.tsx (1)

16-16: 优化了JMAPP主题的重定向逻辑

添加了对路径中包含"jmapp"的判断,确保用户访问JMAPP主题预览页面时不会被重定向。这项改进与文档中更新的预览链接保持一致,使用户可以无缝访问JMAPP主题的演示页面。

@Miles-hxy Miles-hxy merged commit b7a6a20 into jdf2e:feat_v3.x Apr 21, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.x Target branch 3.x action:review This PR needs more reviews (less than 2 approvals) size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants