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(clerk-js): Add tabs to VerifiedDomainPage #1624

Merged
merged 3 commits into from
Aug 25, 2023
Merged

feat(clerk-js): Add tabs to VerifiedDomainPage #1624

merged 3 commits into from
Aug 25, 2023

Conversation

panteliselef
Copy link
Member

@panteliselef panteliselef commented Aug 23, 2023

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

Packages affected

  • @clerk/clerk-js
  • @clerk/clerk-react
  • @clerk/nextjs
  • @clerk/remix
  • @clerk/types
  • @clerk/themes
  • @clerk/localizations
  • @clerk/clerk-expo
  • @clerk/backend
  • @clerk/clerk-sdk-node
  • @clerk/shared
  • @clerk/fastify
  • @clerk/chrome-extension
  • gatsby-plugin-clerk
  • build/tooling/chore

Description

  • npm test runs as expected.
  • npm run build runs as expected.

This PR

  • adds a checkbox to the verified domain page
    image
  • switch to tables in the verified domain page
    image
    -when visiting a verified domain within the addition or verify flow limit the action the user can do
    image

@changeset-bot
Copy link

changeset-bot bot commented Aug 23, 2023

🦋 Changeset detected

Latest commit: 24eb5ce

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

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

Not sure what this means? Click here to learn what changesets are.

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

@panteliselef
Copy link
Member Author

!snapshot

Copy link

@jit-ci jit-ci bot left a comment

Choose a reason for hiding this comment

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

✅ Great news! Jit hasn't found any security issues in your PR. Good Job! 🏆

@clerk-cookie
Copy link
Collaborator

Hey @panteliselef - the snapshot version command generated the following package versions:

Package Version
@clerk/backend 0.28.0-snapshot.b7ea7af
@clerk/chrome-extension 0.3.27-snapshot.b7ea7af
@clerk/clerk-js 4.56.0-snapshot.b7ea7af
eslint-config-custom 0.3.0
@clerk/clerk-expo 0.18.18-snapshot.b7ea7af
@clerk/fastify 0.6.4-snapshot.b7ea7af
gatsby-plugin-clerk 4.4.5-snapshot.b7ea7af
@clerk/localizations 1.25.0-snapshot.b7ea7af
@clerk/nextjs 4.23.3-snapshot.b7ea7af
@clerk/clerk-react 4.24.0-snapshot.b7ea7af
@clerk/remix 2.10.0-snapshot.b7ea7af
@clerk/clerk-sdk-node 4.12.3-snapshot.b7ea7af
@clerk/shared 0.22.0-snapshot.b7ea7af
@clerk/themes 1.7.5
@clerk/types 3.50.0-snapshot.b7ea7af

Tip: use the snippet copy button below to quickly install the required packages.

# @clerk/backend
npm i @clerk/backend@0.28.0-snapshot.b7ea7af
# @clerk/chrome-extension
npm i @clerk/chrome-extension@0.3.27-snapshot.b7ea7af
# @clerk/clerk-js
npm i @clerk/clerk-js@4.56.0-snapshot.b7ea7af
# eslint-config-custom
npm i eslint-config-custom@0.3.0
# @clerk/clerk-expo
npm i @clerk/clerk-expo@0.18.18-snapshot.b7ea7af
# @clerk/fastify
npm i @clerk/fastify@0.6.4-snapshot.b7ea7af
# gatsby-plugin-clerk
npm i gatsby-plugin-clerk@4.4.5-snapshot.b7ea7af
# @clerk/localizations
npm i @clerk/localizations@1.25.0-snapshot.b7ea7af
# @clerk/nextjs
npm i @clerk/nextjs@4.23.3-snapshot.b7ea7af
# @clerk/clerk-react
npm i @clerk/clerk-react@4.24.0-snapshot.b7ea7af
# @clerk/remix
npm i @clerk/remix@2.10.0-snapshot.b7ea7af
# @clerk/clerk-sdk-node
npm i @clerk/clerk-sdk-node@4.12.3-snapshot.b7ea7af
# @clerk/shared
npm i @clerk/shared@0.22.0-snapshot.b7ea7af
# @clerk/themes
npm i @clerk/themes@1.7.5
# @clerk/types
npm i @clerk/types@3.50.0-snapshot.b7ea7af

@panteliselef panteliselef changed the title Org 165 Add tabs to VerifiedDomainPage Aug 24, 2023
@panteliselef
Copy link
Member Author

!snapshot

@clerk-cookie
Copy link
Collaborator

Hey @panteliselef - the snapshot version command generated the following package versions:

Package Version
@clerk/backend 0.28.0-snapshot.12da27f
@clerk/chrome-extension 0.3.27-snapshot.12da27f
@clerk/clerk-js 4.56.0-snapshot.12da27f
eslint-config-custom 0.3.0
@clerk/clerk-expo 0.18.18-snapshot.12da27f
@clerk/fastify 0.6.4-snapshot.12da27f
gatsby-plugin-clerk 4.4.5-snapshot.12da27f
@clerk/localizations 1.25.0-snapshot.12da27f
@clerk/nextjs 4.23.3-snapshot.12da27f
@clerk/clerk-react 4.24.0-snapshot.12da27f
@clerk/remix 2.10.0-snapshot.12da27f
@clerk/clerk-sdk-node 4.12.3-snapshot.12da27f
@clerk/shared 0.22.0-snapshot.12da27f
@clerk/themes 1.7.5
@clerk/types 3.50.0-snapshot.12da27f

Tip: use the snippet copy button below to quickly install the required packages.

# @clerk/backend
npm i @clerk/backend@0.28.0-snapshot.12da27f
# @clerk/chrome-extension
npm i @clerk/chrome-extension@0.3.27-snapshot.12da27f
# @clerk/clerk-js
npm i @clerk/clerk-js@4.56.0-snapshot.12da27f
# eslint-config-custom
npm i eslint-config-custom@0.3.0
# @clerk/clerk-expo
npm i @clerk/clerk-expo@0.18.18-snapshot.12da27f
# @clerk/fastify
npm i @clerk/fastify@0.6.4-snapshot.12da27f
# gatsby-plugin-clerk
npm i gatsby-plugin-clerk@4.4.5-snapshot.12da27f
# @clerk/localizations
npm i @clerk/localizations@1.25.0-snapshot.12da27f
# @clerk/nextjs
npm i @clerk/nextjs@4.23.3-snapshot.12da27f
# @clerk/clerk-react
npm i @clerk/clerk-react@4.24.0-snapshot.12da27f
# @clerk/remix
npm i @clerk/remix@2.10.0-snapshot.12da27f
# @clerk/clerk-sdk-node
npm i @clerk/clerk-sdk-node@4.12.3-snapshot.12da27f
# @clerk/shared
npm i @clerk/shared@0.22.0-snapshot.12da27f
# @clerk/themes
npm i @clerk/themes@1.7.5
# @clerk/types
npm i @clerk/types@3.50.0-snapshot.12da27f

@panteliselef
Copy link
Member Author

!snapshot

@clerk-cookie
Copy link
Collaborator

Hey @panteliselef - the snapshot version command generated the following package versions:

Package Version
@clerk/backend 0.28.0-snapshot.2d40f12
@clerk/chrome-extension 0.3.27-snapshot.2d40f12
@clerk/clerk-js 4.56.0-snapshot.2d40f12
eslint-config-custom 0.3.0
@clerk/clerk-expo 0.18.18-snapshot.2d40f12
@clerk/fastify 0.6.4-snapshot.2d40f12
gatsby-plugin-clerk 4.4.5-snapshot.2d40f12
@clerk/localizations 1.25.0-snapshot.2d40f12
@clerk/nextjs 4.23.3-snapshot.2d40f12
@clerk/clerk-react 4.24.0-snapshot.2d40f12
@clerk/remix 2.10.0-snapshot.2d40f12
@clerk/clerk-sdk-node 4.12.3-snapshot.2d40f12
@clerk/shared 0.22.0-snapshot.2d40f12
@clerk/themes 1.7.5
@clerk/types 3.50.0-snapshot.2d40f12

Tip: use the snippet copy button below to quickly install the required packages.

# @clerk/backend
npm i @clerk/backend@0.28.0-snapshot.2d40f12
# @clerk/chrome-extension
npm i @clerk/chrome-extension@0.3.27-snapshot.2d40f12
# @clerk/clerk-js
npm i @clerk/clerk-js@4.56.0-snapshot.2d40f12
# eslint-config-custom
npm i eslint-config-custom@0.3.0
# @clerk/clerk-expo
npm i @clerk/clerk-expo@0.18.18-snapshot.2d40f12
# @clerk/fastify
npm i @clerk/fastify@0.6.4-snapshot.2d40f12
# gatsby-plugin-clerk
npm i gatsby-plugin-clerk@4.4.5-snapshot.2d40f12
# @clerk/localizations
npm i @clerk/localizations@1.25.0-snapshot.2d40f12
# @clerk/nextjs
npm i @clerk/nextjs@4.23.3-snapshot.2d40f12
# @clerk/clerk-react
npm i @clerk/clerk-react@4.24.0-snapshot.2d40f12
# @clerk/remix
npm i @clerk/remix@2.10.0-snapshot.2d40f12
# @clerk/clerk-sdk-node
npm i @clerk/clerk-sdk-node@4.12.3-snapshot.2d40f12
# @clerk/shared
npm i @clerk/shared@0.22.0-snapshot.2d40f12
# @clerk/themes
npm i @clerk/themes@1.7.5
# @clerk/types
npm i @clerk/types@3.50.0-snapshot.2d40f12

@@ -60,7 +66,8 @@ export const RemoveDomainPage = () => {
successMessage={localizationKeys('organizationProfile.removeDomainPage.successMessage', {
domain: ref.current?.name,
})}
deleteResource={() => Promise.resolve(domain?.delete())}
deleteResource={() => Promise.resolve(domain?.delete()).then((domains as any).unstable__mutate())}
Copy link
Member

Choose a reason for hiding this comment

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

Is domain?.delete a sync method?

});
const { navigateToFlowStart } = useNavigateToFlowStart();
const { params, navigate, queryParams } = useRouter();
const mode = (queryParams.mode ?? 'edit') as 'select' | 'edit';
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const mode = (queryParams.mode ?? 'edit') as 'select' | 'edit';
const mode = (queryParams.mode ||'edit') as 'select' | 'edit';

If we don't care about null, undefined or 0 specifically, let's prefer a plain || otherwise this reads like the falsy values have significant meaning

Copy link
Member

Choose a reason for hiding this comment

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

Also, are you aware whether we use this queryParams pattern in the rest of the codebase?

Copy link
Member Author

Choose a reason for hiding this comment

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

Here's how we did it for the reset password flow. This was implemented by me as well.

Are we considering this a bad pattern ?

@panteliselef panteliselef marked this pull request as draft August 24, 2023 22:45
@panteliselef panteliselef changed the title Add tabs to VerifiedDomainPage [WIP] Add tabs to VerifiedDomainPage Aug 24, 2023
@panteliselef panteliselef marked this pull request as ready for review August 25, 2023 10:51
@panteliselef panteliselef changed the title [WIP] Add tabs to VerifiedDomainPage feat(clerk-js): Add tabs to VerifiedDomainPage Aug 25, 2023
@panteliselef panteliselef merged commit e4e1df8 into main Aug 25, 2023
8 checks passed
@panteliselef panteliselef deleted the ORG-165 branch August 25, 2023 12:33
@clerk-cookie
Copy link
Collaborator

This PR has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@clerk clerk locked as resolved and limited conversation to collaborators Aug 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants