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(app): connect initial setup window #2903

Merged
merged 7 commits into from
Nov 10, 2024
Merged

feat(app): connect initial setup window #2903

merged 7 commits into from
Nov 10, 2024

Conversation

rhahao
Copy link
Member

@rhahao rhahao commented Nov 10, 2024

No description provided.

Copy link

vercel bot commented Nov 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
organized-app ✅ Ready (Inspect) Visit Preview Nov 10, 2024 2:01pm

Copy link
Contributor

coderabbitai bot commented Nov 10, 2024

Caution

Review failed

The pull request is closed.

Walkthrough

The pull request introduces several changes across multiple files, primarily focusing on the refactoring and enhancement of components and hooks related to user settings and notifications. Key modifications include renaming components, updating state management logic, and introducing new components for handling time and date formats. Additionally, the Snackbar component is updated for consistency, and new hooks are created for managing user preferences. The overall structure remains intact while improving clarity and functionality in managing user interactions and settings.

Changes

File Change Summary
src/components/snackbar/index.tsx Renamed imported Snackbar to MUISnackbar, updated return statement and export accordingly.
src/features/app_start/vip/congregation_create/congregation_access_code/useCongregationAccessCode.tsx Added state management for isSetup and isAppLoad, modified handleSetAccessCode logic.
src/features/app_start/vip/congregation_create/index.tsx Updated title passed to PageHeader from t('tr_createCongregationAccount') to t('tr_createCongregation').
src/features/app_start/vip/congregation_encryption/congregation_access_code/useCongregationAccessCode.tsx Added state management for isSetup and isAppLoad, modified handleValidateAccessCode logic.
src/features/app_start/vip/email_link_authentication/useEmailLinkAuth.tsx Added state management for user account creation and sign-in status, updated handleResult logic.
src/features/app_start/vip/oauth/button_base/useButtonBase.tsx Modified updateUserSettings to include a new property 'cong_settings.cong_new': false.
src/features/app_start/vip/startup/useStartup.tsx Introduced new state variable isStart, removed certain state setters, and updated runStartupCheck logic.
src/features/app_start/vip/user_account_created/useUserAccountCreated.tsx Added state management for isUserSignInState and updated control flow with useEffect.
src/features/app_start/vip/verify_mfa/useVerifyMFA.tsx Replaced isCongAccountCreateState with isUserAccountCreatedState, updated handleAuthorization logic.
src/features/app_start/vip/vip_info_tip/index.tsx Replaced fragment wrapper with Stack component for layout management.
src/features/congregation/settings/congregation_basic/hour_format/index.tsx Introduced HourFormat component to manage hour format settings.
src/features/congregation/settings/congregation_basic/hour_format/useHourFormat.tsx Added custom hook useHourFormat for managing hour format state.
src/features/congregation/settings/congregation_basic/index.tsx Replaced SwitchWithLabel with HourFormat component for hour format management.
src/features/congregation/settings/congregation_basic/useCongregationBasic.tsx Removed hour format toggle functionality.
src/features/congregation/settings/meeting_forms/date_format/index.tsx Introduced DateFormat component for managing date format selection.
src/features/congregation/settings/meeting_forms/date_format/useDateFormat.tsx Added custom hook useDateFormat for managing date format state.
src/features/congregation/settings/meeting_forms/index.tsx Replaced previous formatting logic with NameFormat and DateFormat components.
src/features/congregation/settings/meeting_forms/name_format/index.tsx Introduced NameFormat component for managing fullname format selection.
src/features/congregation/settings/meeting_forms/name_format/useNameFormat.tsx Added custom hook useNameFormat for managing fullname format state.
src/features/congregation/settings/meeting_forms/useMeetingForms.tsx Removed fullname and date format management logic.
src/features/dashboard/initial_setup/basic_settings/index.tsx Introduced BasicSettings component for managing basic settings.
src/features/dashboard/initial_setup/basic_settings/index.types.ts Added type definition BasicSettingsProps.
src/features/dashboard/initial_setup/basic_settings/useBasicSettings.tsx Added custom hook useBasicSettings for managing basic settings actions.
src/features/dashboard/initial_setup/index.tsx Introduced InitialSetup component for managing initial setup process.
src/features/dashboard/initial_setup/person_record/index.tsx Introduced PersonRecord component for managing person records.
src/features/dashboard/initial_setup/person_record/index.types.ts Added type definition PersonRecordProps.
src/features/dashboard/initial_setup/person_record/usePersonRecord.tsx Added custom hook usePersonRecord for managing person records.
src/features/dashboard/initial_setup/useInitialSetup.tsx Added custom hook useInitialSetup for managing initial setup state.
src/features/dashboard/initial_setup_modal_window/index.tsx Component InitialSetupModalWindow removed.
src/features/dashboard/initial_setup_modal_window/initial_setup_modal_window.styled.tsx Styled components for modal window removed.
src/features/dashboard/initial_setup_modal_window/initial_setup_modal_window.types.ts Type definition for modal window props removed.
src/features/index.ts Removed export for InitialSetupModalWindow.
src/features/migration/useMigration.tsx Updated logic for determining open variable using nullish coalescing operator.
src/features/persons/button_actions/useButtonActions.tsx Modified handleSavePerson navigation logic and simplified notification calls.
src/layouts/root_layout/index.tsx Added InitialSetup component and modified rendering logic based on initialSetupOpen.
src/layouts/root_layout/useRootLayout.tsx Updated migrationOpen logic and introduced initialSetupOpen variable.
src/pages/dashboard/congregation/index.tsx Updated destructured properties from useCurrentUser to replace isAppointed with isElder.
src/pages/dashboard/index.tsx Updated imports, simplified conditional rendering for Snackbar.
src/pages/dashboard/useDashboard.tsx Enhanced state management for newCongSnack, adjusted isMigrated logic.
src/services/api/congregation.ts Introduced new function apiSetUserUid for setting user UID.
src/services/dexie/schema.ts Updated end_date in midweek_meeting_student schema to allow null values.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Snackbar
    participant AppState
    participant AccessCodeHandler
    User->>AccessCodeHandler: Set Access Code
    AccessCodeHandler->>AppState: Update isSetup to false
    AccessCodeHandler->>AppState: Call loadApp()
    AccessCodeHandler->>AppState: Call runUpdater()
    AccessCodeHandler->>AppState: Set isAppLoad to false after timeout
    AppState->>Snackbar: Show Snackbar Notification
Loading

Possibly related PRs

  • feat(app): support attendance tracking role #2750: The changes in the Dashboard component involve updates to the useCurrentUser hook, which may relate to the Snackbar component's role in displaying notifications based on user permissions, similar to how the Snackbar is used in the main PR for user feedback.
  • feat(app): improve user flow when access changes #3023: The modifications to the DatePicker component include enhancements to user interaction, which could be relevant to how the Snackbar component is utilized for notifications in response to user inputs.

Warning

Rate limit exceeded

@rhahao has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 28 minutes and 7 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

Reviewing files that changed from the base of the PR and between d530994 and 9684a20.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between d530994 and 9684a20.

📒 Files selected for processing (41)
  • src/components/snackbar/index.tsx (4 hunks)
  • src/features/app_start/vip/congregation_create/congregation_access_code/useCongregationAccessCode.tsx (2 hunks)
  • src/features/app_start/vip/congregation_create/index.tsx (1 hunks)
  • src/features/app_start/vip/congregation_encryption/congregation_access_code/useCongregationAccessCode.tsx (3 hunks)
  • src/features/app_start/vip/email_link_authentication/useEmailLinkAuth.tsx (3 hunks)
  • src/features/app_start/vip/oauth/button_base/useButtonBase.tsx (1 hunks)
  • src/features/app_start/vip/startup/useStartup.tsx (4 hunks)
  • src/features/app_start/vip/user_account_created/useUserAccountCreated.tsx (1 hunks)
  • src/features/app_start/vip/verify_mfa/useVerifyMFA.tsx (4 hunks)
  • src/features/app_start/vip/vip_info_tip/index.tsx (3 hunks)
  • src/features/congregation/settings/congregation_basic/hour_format/index.tsx (1 hunks)
  • src/features/congregation/settings/congregation_basic/hour_format/useHourFormat.tsx (1 hunks)
  • src/features/congregation/settings/congregation_basic/index.tsx (2 hunks)
  • src/features/congregation/settings/congregation_basic/useCongregationBasic.tsx (0 hunks)
  • src/features/congregation/settings/meeting_forms/date_format/index.tsx (1 hunks)
  • src/features/congregation/settings/meeting_forms/date_format/useDateFormat.tsx (1 hunks)
  • src/features/congregation/settings/meeting_forms/index.tsx (2 hunks)
  • src/features/congregation/settings/meeting_forms/name_format/index.tsx (1 hunks)
  • src/features/congregation/settings/meeting_forms/name_format/useNameFormat.tsx (1 hunks)
  • src/features/congregation/settings/meeting_forms/useMeetingForms.tsx (1 hunks)
  • src/features/dashboard/initial_setup/basic_settings/index.tsx (1 hunks)
  • src/features/dashboard/initial_setup/basic_settings/index.types.ts (1 hunks)
  • src/features/dashboard/initial_setup/basic_settings/useBasicSettings.tsx (1 hunks)
  • src/features/dashboard/initial_setup/index.tsx (1 hunks)
  • src/features/dashboard/initial_setup/person_record/index.tsx (1 hunks)
  • src/features/dashboard/initial_setup/person_record/index.types.ts (1 hunks)
  • src/features/dashboard/initial_setup/person_record/usePersonRecord.tsx (1 hunks)
  • src/features/dashboard/initial_setup/useInitialSetup.tsx (1 hunks)
  • src/features/dashboard/initial_setup_modal_window/index.tsx (0 hunks)
  • src/features/dashboard/initial_setup_modal_window/initial_setup_modal_window.styled.tsx (0 hunks)
  • src/features/dashboard/initial_setup_modal_window/initial_setup_modal_window.types.tsx (0 hunks)
  • src/features/index.ts (0 hunks)
  • src/features/migration/useMigration.tsx (1 hunks)
  • src/features/persons/button_actions/useButtonActions.tsx (2 hunks)
  • src/layouts/root_layout/index.tsx (3 hunks)
  • src/layouts/root_layout/useRootLayout.tsx (2 hunks)
  • src/pages/dashboard/congregation/index.tsx (2 hunks)
  • src/pages/dashboard/index.tsx (4 hunks)
  • src/pages/dashboard/useDashboard.tsx (5 hunks)
  • src/services/api/congregation.ts (1 hunks)
  • src/services/dexie/schema.ts (1 hunks)

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

@rhahao rhahao merged commit 49116a6 into sws2apps:main Nov 10, 2024
10 checks passed
Copy link

cypress bot commented Nov 10, 2024

organized-app    Run #1552

Run Properties:  status check passed Passed #1552  •  git commit 49116a6524: chore(dashboard): update import path
Project organized-app
Branch Review main
Run status status check passed Passed #1552
Run duration 00m 11s
Commit git commit 49116a6524: chore(dashboard): update import path
Committer rhahao
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 1
View all changes introduced in this branch ↗︎

@rhahao
Copy link
Member Author

rhahao commented Nov 30, 2024

🎉 This PR is included in version 2.130.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant