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(console): unsaved changes alert #1409

Merged
merged 6 commits into from
Jul 5, 2022

Conversation

xiaoyijun
Copy link
Contributor

@xiaoyijun xiaoyijun commented Jul 4, 2022

Summary

feat(console): unsaved changes alert

Note

React-Router V6 has removed the useBlocker & usePrompt API, so I implemented a workaround solution to support this feature.
FYI: remix-run/react-router#8139

Related PRs

Testing

SaveAlert

@github-actions
Copy link

github-actions bot commented Jul 4, 2022

COMPARE TO master

Total Size Diff 📈 +4.74 KB

Diff by File
Name Diff
packages/console/package.json 📈 +25 Bytes
packages/console/src/components/ConfirmModal/index.tsx 📈 +45 Bytes
packages/console/src/components/UnsavedChangesAlertModal/index.tsx 📈 +2.04 KB
packages/console/src/pages/ApiResourceDetails/index.tsx 📈 +150 Bytes
packages/console/src/pages/ApplicationDetails/components/AdvancedSettings.tsx 📈 +502 Bytes
packages/console/src/pages/ApplicationDetails/components/Settings.tsx 📈 +343 Bytes
packages/console/src/pages/ApplicationDetails/index.tsx 📈 +161 Bytes
packages/console/src/pages/SignInExperience/index.tsx 📈 +69 Bytes
packages/console/src/pages/SignInExperience/tabs/BrandingTab.tsx 📈 +829 Bytes
packages/console/src/pages/SignInExperience/tabs/OthersTab.tsx 📈 +828 Bytes
packages/console/src/pages/SignInExperience/tabs/SignInMethodsTab.tsx 📈 +785 Bytes
packages/phrases/src/locales/en.ts 📈 +180 Bytes
packages/phrases/src/locales/zh-cn.ts 📈 +152 Bytes
pnpm-lock.yaml 📈 +1.27 KB

Copy link
Member

@gao-sun gao-sun left a comment

Choose a reason for hiding this comment

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

your pnpm lock file looks not right

@xiaoyijun xiaoyijun force-pushed the xiaoyijun-log-2257-unsaved-alert branch from c0d76c7 to 014a649 Compare July 4, 2022 14:24
@xiaoyijun xiaoyijun force-pushed the xiaoyijun-log-2257-unsaved-alert branch from 014a649 to 8b3eecb Compare July 4, 2022 14:33
@xiaoyijun xiaoyijun marked this pull request as draft July 5, 2022 02:13
@xiaoyijun xiaoyijun marked this pull request as ready for review July 5, 2022 02:42
@xiaoyijun xiaoyijun requested a review from gao-sun July 5, 2022 02:43
Copy link
Contributor

@wangsijie wangsijie left a comment

Choose a reason for hiding this comment

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

return JSX in hooks is not a common practice?

packages/phrases/src/locales/zh-cn.ts Outdated Show resolved Hide resolved
@xiaoyijun xiaoyijun merged commit 098367e into master Jul 5, 2022
@xiaoyijun xiaoyijun deleted the xiaoyijun-log-2257-unsaved-alert branch July 5, 2022 09:09
IceHe pushed a commit that referenced this pull request Jul 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

3 participants