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

feat: add swap component and optimizing layout known issues #4149

Merged
merged 1 commit into from
Aug 14, 2024
Merged

Conversation

anncwb
Copy link
Collaborator

@anncwb anncwb commented Aug 14, 2024

Description

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.

Checklist

ℹ️ Check all checkboxes - this will indicate that you have done everything in accordance with the rules in CONTRIBUTING.

  • If you introduce new functionality, document it. You can run documentation with pnpm run docs:dev command.
  • Run the tests with pnpm test.
  • Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Summary by CodeRabbit

  • New Features

    • Introduced a new Swap component with customizable toggle functionality.
    • Added a useLayout composition function to manage layout properties dynamically.
  • Improvements

    • Enhanced theming controls for the <Card /> component in dark mode.
    • Refined visual styles for menu items, toast, and tooltips to improve user experience.
  • Bug Fixes

    • Resolved inconsistencies in layout management and component prop handling.
  • Documentation

    • Simplified installation commands across several packages to improve user onboarding.
  • Style

    • Updated CSS variables for better visual consistency across themes.

@anncwb anncwb requested review from vince292007 and a team as code owners August 14, 2024 12:32
Copy link

changeset-bot bot commented Aug 14, 2024

⚠️ No Changeset found

Latest commit: 2c72a46

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

coderabbitai bot commented Aug 14, 2024

Warning

Rate limit exceeded

@anncwb has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 23 minutes and 31 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

Commits

Files that changed from the base of the PR and between b287400 and 2c72a46.

Walkthrough

The recent updates refine theming and component styling across various UI elements, enhancing clarity and visual appeal. Key changes include adjustments to CSS variables for improved theme management, the introduction of new components, and modifications to existing properties to enforce required values. These updates are aimed at streamlining user interaction and improving the overall aesthetic consistency of the application.

Changes

Files Change Summary
docs/src/guide/in-depth/theme.md Modified CSS variables for theming, focusing on dark themes for better customization and visual consistency.
internal/node-utils/src/spinner.ts Updated import for Ora type to enhance type safety.
packages/@core/base/design/src/design-tokens/dark/index.css Adjusted color variables to refresh the dark theme's accent colors, enhancing contrast.
packages/@core/base/design/src/design-tokens/default/index.css Changed --sidebar-deep variable for simplified color representation, impacting sidebar design.
packages/@core/ui-kit/layout-ui/src/components/layout-header.vue Updated class for VbenIconButton to refine visual styling.
packages/@core/ui-kit/layout-ui/src/components/layout-sidebar.vue Made extraWidth, theme, and width props required, improving component API clarity.
packages/@core/ui-kit/layout-ui/src/hooks/use-layout.ts Introduced useLayout custom hook for better layout management based on device type.
packages/@core/ui-kit/layout-ui/src/vben-layout.ts Removed unnecessary properties from VbenLayoutProps, simplifying layout configuration.
packages/@core/ui-kit/layout-ui/src/vben-layout.vue Centralized layout logic using useLayout, enhancing clarity and maintainability.
packages/@core/ui-kit/menu-ui/src/components/menu.vue Adjusted menu item styles for improved visual compactness and clarity in active submenu background colors.
packages/@core/ui-kit/shadcn-ui/src/components/index.ts Added export for the swap component, expanding the UI component library.
packages/@core/ui-kit/shadcn-ui/src/components/spinner/index.ts Changed export name from Spinner to VbenSpinner, aligning with a new naming convention.
packages/@core/ui-kit/shadcn-ui/src/components/swap/index.ts Introduced export for the new VbenSwap component, enhancing functionality.
packages/@core/ui-kit/shadcn-ui/src/components/swap/swap.vue Added toggle functionality with customizable animations for the new Swap component, enhancing user interactivity.
packages/@core/ui-kit/shadcn-ui/src/components/ui/dialog/DialogScrollContent.vue Minor styling update to DialogOverlay to include a border class.
packages/@core/ui-kit/shadcn-ui/src/components/ui/sheet/sheet.ts Enhanced bottom and right variants' border styling within the sheet component.
packages/@core/ui-kit/shadcn-ui/src/components/ui/toast/toast.ts Improved toast component styling by adding a border class to toastVariants, enhancing visual appearance.
packages/@core/ui-kit/shadcn-ui/src/components/ui/tooltip/TooltipContent.vue Updated tooltip styling by modifying class attributes to enhance visual presentation.
packages/constants/README.md Simplified package installation command by removing the --workspace flag.
packages/effects/hooks/README.md Updated installation instructions for the @vben/hooks package, removing the --workspace flag.
packages/effects/layouts/src/basic/content/content.vue Replaced Spinner component with VbenSpinner to update loading indicator.
packages/effects/layouts/src/basic/layout.vue Renamed theme to sidebarTheme for clarity; restructured sidebar theme logic.
packages/effects/layouts/src/iframe/iframe-router-view.vue Replaced Spinner with VbenSpinner, updating component usage for loading states.
packages/icons/README.md Similar simplification of package installation command by removing the --workspace flag.
packages/styles/README.md Updated installation command for @vben/styles package, removing --workspace flag for easier usage.
packages/types/README.md Simplified installation command for @vben/types package, enhancing usability.
packages/utils/README.md Modified installation command for @vben/utils package for a more direct approach without the --workspace flag.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Layout
    participant Spinner

    User->>Layout: Request page load
    Layout->>Spinner: Show loading indicator
    Spinner-->>Layout: Loading complete
    Layout->>User: Display content
Loading

🐰 In the garden, where the changes bloom,
A spinner twirls in joyous room.
With colors bright and themes anew,
The layout hops with every view.
So let us cheer, both near and far,
For all the wonders, like a shining star! 🌟


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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 as 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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

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.

@anncwb anncwb added the feature label Aug 14, 2024
@anncwb anncwb merged commit 83fcdec into main Aug 14, 2024
15 checks passed
@anncwb anncwb deleted the perf/layout branch August 14, 2024 12:37
@github-actions github-actions bot locked and limited conversation to collaborators Sep 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant