Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync release-3.20.0 to dev #2716

Merged
merged 5 commits into from
Dec 30, 2024
Merged

sync release-3.20.0 to dev #2716

merged 5 commits into from
Dec 30, 2024

Conversation

kagol
Copy link
Member

@kagol kagol commented Dec 30, 2024

PR

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our Commit Message Guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Summary by CodeRabbit

Release Notes

  • Version Updates

    • Updated @opentiny/vue-theme to version 3.20.1
    • Updated @opentiny/vue-runtime to version 3.20.4
    • Updated @opentiny/vue-fluent-editor to version 3.20.2
  • Dependency Changes

    • Upgraded @opentiny/fluent-editor to version 3.24.0
  • Styling Improvements

    • Enhanced form item validation icon layout to prevent shrinking
  • Build Process

    • Updated component exclusion list for build configurations
    • Added support for tiny-vue-saas-common library in build tasks

gimmyhehe and others added 5 commits December 30, 2024 10:48
* feat: add saas-common runtime

* feat: add saas-common runtime
…nd add base-select component (#2705)

* fix(runtime): fix the problem of simple-runtime relying on echarts, and add base-select component

* fix(runtime): fix the problem of simple-runtime relying on echarts, and add base-select component

* feat: update runtime version
Copy link

coderabbitai bot commented Dec 30, 2024

Walkthrough

This pull request encompasses modifications across multiple files in the OpenTiny Vue project. The changes primarily involve updating component build configurations, package versions, and styling. Key updates include modifying the notSimpleComponents array to replace chart components with Huicharts components, enhancing build runtime configurations, updating package versions for various components like vue-theme, vue-runtime, and fluent-editor, and adding a flex-shrink property to form item validation icons.

Changes

File Change Summary
internals/cli/src/commands/build/build-entry-app.ts Replaced chart-related components in notSimpleComponents with Huicharts components
internals/cli/src/commands/build/build-runtime.ts Enhanced batchBuild and getEntryTasks functions, added tiny-vue-saas-common library support
packages/theme/package.json Version updated from 3.20.0 to 3.20.1
packages/theme/src/form-item/index.less Added flex-shrink: 0; to .validate-icon class
packages/vue-runtime/package.json Version updated from 3.20.0 to 3.20.4
packages/vue/src/fluent-editor/package.json Version updated from 3.20.1 to 3.20.2, updated @opentiny/fluent-editor dependency

Possibly related PRs

Suggested reviewers

  • zzcr

Poem

🐰 Hopping through code with glee,
Huicharts dancing, components free!
Versions bump, styles align,
Build configs now intertwine,
A rabbit's code review delight! 🚀

Tip

CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command @coderabbitai generate docstrings to have CodeRabbit automatically generate docstrings for your pull request. We would love to hear your feedback on Discord.


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 5b8edfe and d96ca3f.

📒 Files selected for processing (6)
  • internals/cli/src/commands/build/build-entry-app.ts (1 hunks)
  • internals/cli/src/commands/build/build-runtime.ts (5 hunks)
  • packages/theme/package.json (1 hunks)
  • packages/theme/src/form-item/index.less (1 hunks)
  • packages/vue-runtime/package.json (1 hunks)
  • packages/vue/src/fluent-editor/package.json (2 hunks)
✅ Files skipped from review due to trivial changes (2)
  • packages/theme/package.json
  • packages/vue-runtime/package.json
🔇 Additional comments (9)
packages/theme/src/form-item/index.less (1)

209-209: LGTM! Good defensive styling fix.

Adding flex-shrink: 0 to the validation icon ensures it maintains its size and remains visible even when the container space is constrained. This is a good practice for icons in flex layouts.

Please verify the fix resolves any icon shrinking issues across:

  • Different form item widths
  • Various viewport sizes
  • Different validation message lengths

Run this script to find test files that might help with verification:

✅ Verification successful

Let me check the test files to verify if there are any existing issues or if the change is properly tested.


Let me check the actual form item styling to verify the flex-shrink property's context.


The flex-shrink fix is properly implemented and verified

After reviewing the code context, I can confirm that:

  1. The flex-shrink: 0 is correctly applied to the validation icon within the error message display
  2. The error message container uses a flex layout (.@{form-item-prefix-cls}__error--block has display: flex)
  3. The test files show various validation scenarios with different form layouts and field lengths
  4. The fix prevents icon shrinking while allowing the error message text to wrap as needed

The implementation is correct and well-tested across:

  • Different form layouts (inline, label-top, label-left)
  • Various field types with validation (required fields, URLs, emails, etc.)
  • Different form item widths (380px and 450px demo forms)
  • Long label text scenarios that could cause space constraints
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Find relevant test files for form validation icon styling
# Look for form item test files and examples
fd -e vue -e spec -e test "form-item|form.*validation" 

Length of output: 438


Script:

#!/bin/bash
# Check the content of form validation test files to understand the test coverage
cat examples/sites/demos/pc/app/form/form-validation.vue examples/sites/demos/mobile-first/app/form/form-validation.vue

Length of output: 6903


Script:

#!/bin/bash
# Check the form-item styles to understand the flex context
cat packages/theme/src/form-item/index.less

Length of output: 8791

internals/cli/src/commands/build/build-entry-app.ts (1)

65-91: Consider verifying newly added Huicharts components.
These chart-like components have been renamed/prefixed with “Huicharts.” Please ensure each one exists in the codebase and is spelled consistently (e.g., “HuichartsMap” vs. “HuichartsAmap”) to avoid any unexpected imports or references. Also confirm that these components remain excluded from “simple” builds for the intended reasons.

✅ Verification successful

Based on the search results, I can verify that all the Huicharts components listed in the build-entry-app.ts file are properly defined and used consistently throughout the codebase. The findings show:

  1. All components are properly registered in packages/modules.json with correct paths and configurations
  2. The components are consistently imported and used in example demos with proper naming conventions
  3. There is clear consistency between map-related components (HuichartsMap, HuichartsAmap, HuichartsBmap)
  4. The components are properly excluded/included based on the "exclude: false" setting in modules.json

All Huicharts components are properly defined and consistently used across the codebase.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Attempt to locate Huicharts imports in the codebase and confirm consistency.

rg 'Huicharts[A-Z]\w*' -A 5

Length of output: 66518

internals/cli/src/commands/build/build-runtime.ts (5)

50-50: Check assumptions when extracting the first task.
Using const { mode, libPath } = tasks[0] assumes tasks is non-empty. Although there’s a check for empty tasks above, make sure no other caller bypasses this check.


60-61: Runtime setting looks appropriate.
Marking isRuntime: true and designating design as 'saas' for tiny-vue-saas-common is a neat approach to keep the build configuration flexible.


168-171: New entry for 'tiny-vue-saas-common'
Adding tiny-vue-saas-common to the build tasks is consistent with the design-based approach. Confirm that the underlying source (vue-saas-common/src/index.ts) is properly maintained and tested.


243-243: Verify Tailwind content path.
Ensuring '--content' references 'tiny-vue-all.mjs' is an interesting choice. Confirm that the resulting CSS covers all necessary classes for other tasks if multiple entry points exist.


123-125: Refine external dependencies condition.
Conditionally including @vue/composition-api and vue in externals only if libPath === 'tiny-vue-saas-common' may be correct for SAAS builds. However, verify that you do not inadvertently exclude them from other libraries that also rely on these dependencies.

✅ Verification successful

Let me search for more specific information about Vue and composition API usage in the codebase.


Let me try a different search approach to find Vue and composition API usage.


Let me search for specific dependencies and imports in the build configuration.


Let me try a different search to find externals configuration and Vue dependencies.


Let me check one more thing about the dependencies in the package configuration.


Based on the gathered information, I can now provide a final response about the externals configuration.

The externals configuration for tiny-vue-saas-common is correctly implemented

The current configuration in build-runtime.ts that conditionally includes @vue/composition-api and vue as externals only for tiny-vue-saas-common is correct and intentional because:

  1. The tiny-vue-saas-common package specifically depends on @opentiny/vue-common and is designed to work with Vue's ecosystem.

  2. The build configuration shows that other libraries have their own externals configuration through getExternal(), ensuring proper dependency handling for each package.

  3. The special case for tiny-vue-saas-common is part of the design pattern where it acts as a bridge between Vue dependencies and SAAS-specific functionality, as evidenced by:

    design: libPath === 'tiny-vue-saas-common' ? 'saas' : null
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Looks for references to @vue/composition-api and vue in tasks, verifying no unintended usage outside 'tiny-vue-saas-common'.
rg '@vue/composition-api|vue' -A 3

Length of output: 66384


Script:

#!/bin/bash
# Search for Vue and composition API imports/usage
rg -A 3 "import.*@vue/composition-api|import.*vue" --type ts --type vue

Length of output: 101


Script:

#!/bin/bash
# Search for Vue and composition API dependencies and imports
rg -A 3 "@vue/composition-api|vue" --type ts

Length of output: 119385


Script:

#!/bin/bash
# Search for Vue and composition API related dependencies in build config
rg -A 3 "externals.*vue|externals.*composition-api" internals/cli/src/commands/build/

Length of output: 87


Script:

#!/bin/bash
# Search for externals configuration and Vue dependencies in build files
rg -A 5 "externals|tiny-vue-saas-common|@vue/composition-api" internals/cli/src/commands/build/

Length of output: 3827


Script:

#!/bin/bash
# Search for package dependencies and peer dependencies related to Vue
rg -A 5 '"dependencies"|"peerDependencies".*vue' packages/vue-saas-common/package.json packages/vue/package.json

Length of output: 908

packages/vue/src/fluent-editor/package.json (2)

3-3: Version bump to 3.20.2
Make sure this aligns with the referenced changes in sibling packages so that dependent projects don’t encounter version inconsistencies.


14-14: Dependency upgrade of @opentiny/fluent-editor
Raising to “^3.24.0” is likely safe, but confirm that newly introduced features or changes in @opentiny/fluent-editor are compatible with your usage.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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. (Beta)
  • @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.

Copy link

Walkthrough

This pull request synchronizes changes from the release-3.20.0 branch to the dev branch. It includes updates to component names, build configurations, and package files, aiming to align the development branch with the latest release changes.

Changes

Files Summary
internals/cli/src/commands/build/build-entry-app.ts Updated component names from Chart to Huicharts variants.
internals/cli/src/commands/build/build-runtime.ts Added libPath to tasks, updated external dependencies logic, and modified build paths.
packages/theme/src/form-item/index.less Added flex-shrink: 0; to .validate-icon.
packages/theme/package.json, packages/vue-runtime/package.json, packages/vue/src/fluent-editor/package.json Minor version updates and dependency adjustments.

@@ -119,6 +120,9 @@ async function batchBuildAll({ vueVersion, tasks, message, emptyOutDir, npmScope
external: (source, importer, isResolved) => {
if (isResolved || !importer) return false

if (libPath === 'tiny-vue-saas-common') {
return ['@vue/composition-api', 'vue'].includes(source)

Choose a reason for hiding this comment

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

Ensure that adding libPath as a condition for external dependencies does not unintentionally exclude necessary modules for other libPath values.

Copy link

[e2e-test-warn]
The component to be tested is missing.

The title of the Pull request should look like "fix(vue-renderless): [action-menu, alert] fix xxx bug".

Please make sure you've read our contributing guide

@zzcr zzcr merged commit 79d2397 into dev Dec 30, 2024
11 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