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

Fix desktop and use icons from packages instead of public #4307

Merged
merged 2 commits into from Nov 16, 2023

Conversation

xudaotutou
Copy link
Contributor

@xudaotutou xudaotutou commented Nov 16, 2023

🤖[deprecated] Generated by Copilot at 784f15c

Summary

🚀🎨🚧

The pull request refactors various components in the frontend/desktop project to use the UI components and icons from the @chakra-ui/react and @sealos/ui packages, instead of custom ones. This improves the code quality, consistency, and scalability of the UI, and also adds some new features, such as copying the user's ID and checking the sign up feature flag. The pull request also improves the performance and user experience of the application by using SWC to transpile the sealos-desktop-sdk package and by replacing dynamic imports with static imports. The pull request also removes some unused and redundant code and imports from the project.

@sealos/ui icons
Refactor and improve UI
Winter of code debt

Walkthrough

  • Added enableSignUp function to check sign up feature status by environment variable in frontend/desktop/src/services/enable.ts (link)
  • Used enableSignUp function to prevent sign up by password or oauth if feature is disabled in frontend/desktop/src/pages/api/auth/password/exist.ts (link,link) and frontend/desktop/src/services/backend/oauth.ts (link,link)
  • Replaced custom icons with icons from @sealos/ui package in various components (link,link,link,link,link,link,link,link,link,link,link,link,link,link,link,link,link,link,link,link,link,link,link)
  • Replaced custom UI components with components from @chakra-ui/react library in various components (link,link,link,link,link,link,link,link,link,link,link,link,link,link,link,link)
  • Removed unused imports and code in various modules (link,link,link,link,link,link,link,link,link,link,link,link,link,link)
  • Renamed default export of Account component from Index to Account in frontend/desktop/src/components/account/index.tsx (link)
  • Replaced dynamic import of UserMenu component with static import in frontend/desktop/src/components/desktop_content/index.tsx (link)
  • Replaced Chinese comments with English comments in frontend/desktop/src/services/backend/oauth.ts (link,link,link)
  • Added new lines before and after comments in frontend/desktop/src/services/backend/oauth.ts (link,link)
  • Added new package name to transpilePackages option in nextConfig object in frontend/desktop/next.config.js (link)
  • Deleted frontend/desktop/src/components/icons/GroupAdd.tsx and frontend/desktop/src/components/icons/DeleteIcon.tsx files (link,link)

@sealos-ci-robot
Copy link
Member

🤖 Generated by lychee action

Summary

Status Count
🔍 Total 994
✅ Successful 321
⏳ Timeouts 0
🔀 Redirected 0
👻 Excluded 672
❓ Unknown 0
🚫 Errors 0

Full action output

Full Github Actions output

Copy link

sweep-ai bot commented Nov 16, 2023

Apply Sweep Rules to your PR?

  • Apply: All new business logic should have corresponding unit tests.
  • Apply: Refactor large functions to be more modular.
  • Apply: Add docstrings to all functions and file headers.

Copy link

codecov bot commented Nov 16, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (46127ec) 65.45% compared to head (784f15c) 65.45%.
Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4307   +/-   ##
=======================================
  Coverage   65.45%   65.45%           
=======================================
  Files           8        8           
  Lines         660      660           
=======================================
  Hits          432      432           
  Misses        180      180           
  Partials       48       48           

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

@c121914yu c121914yu merged commit 5d8e670 into labring:main Nov 16, 2023
28 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants