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:desktop & applaunchpad novice guide #4392

Merged
merged 6 commits into from
Dec 8, 2023
Merged

Conversation

zjy365
Copy link
Contributor

@zjy365 zjy365 commented Dec 8, 2023

πŸ€–[deprecated] Generated by Copilot at 38745ca

Summary

πŸ“šπŸŽπŸ› οΈ

Added user guide feature to the frontend desktop application using the @sealos/driver package and the user account CRD. Updated the translations, the API functions, the components, and the styles to support the user guide feature. Added new endpoints to get and update the user account CRD from the backend using the sealos-desktop-sdk package.

driver guides users
through desktop app features
autumn leaves reward

Walkthrough

  • Add the @sealos/driver package as a dependency and a transpile target for the Next.js frontend application (link, link, link)
  • Add the useDriver hook to initialize and control the user guide feature using the driver package (link, link, link)
  • Add the UserGuide component and a semi-transparent overlay to the DesktopContent component to render the user guide popovers and highlight the target elements (link)
  • Add a className attribute to the AppWindow and FloatingButton components to assign unique class names for the user guide target elements (link, link)
  • Add some styles for the user guide popover content to the globals.scss file (link)
  • Add some translation keys and values for the user guide texts to the common.json files in the en and zh locales (link, link)
  • Add some API functions and handlers to get and update the user account CRD, which contains the user balance and the user guide annotations (link, link, link, link, link, link)
  • Add the guideEnabled variable to the API handler for the /api/platform/getEnv endpoint to enable or disable the user guide feature based on the GUIDE_ENABLED environment variable (link, link)
  • Add the activities property to the response data of the API handler for the /api/price/bonus endpoint to store the user guide reward strategy from the backend (link)
  • Add the AccountCRD type to the user.ts file to describe the shape of the user account CRD object (link)
  • Add the GUIDE_DESKTOP_INDEX_KEY constant to the account.ts file to define the annotation key for the user guide completion status (link)
  • Remove some unused translation keys and values from the common.json file in the zh locale (link)
  • Remove an unused import from the API handler for the /api/price/bonus endpoint (link)
  • Move the import of the UserMenu component to the top of the DesktopContent component file (link)
  • Remove an empty line from the DesktopContent component file (link)

Copy link

Whoa! Easy there, Partner!

This PR is too big. Please break it up into smaller PRs.

@sealos-ci-robot
Copy link
Member

sealos-ci-robot commented Dec 8, 2023

πŸ€– Generated by lychee action

Summary

Status Count
πŸ” Total 1164
βœ… Successful 399
⏳ Timeouts 0
πŸ”€ Redirected 0
πŸ‘» Excluded 764
❓ Unknown 0
🚫 Errors 0

Full action output

Full Github Actions output

Copy link

sweep-ai bot commented Dec 8, 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 Dec 8, 2023

Codecov Report

All modified and coverable lines are covered by tests βœ…

Comparison is base (5312580) 65.45% compared to head (9aae3f2) 65.45%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4392   +/-   ##
=======================================
  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 174f08f into labring:main Dec 8, 2023
21 of 22 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.

3 participants