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: Free drops requires activated email #8668

Merged
merged 23 commits into from
Dec 21, 2023
Merged

Conversation

hassnian
Copy link
Contributor

@hassnian hassnian commented Dec 19, 2023

PR Type

  • Bugfix
  • Feature
  • Refactoring

Context

Did your issue had any of the "$" label on it?

  • Fill up your DOT address: Payout

Community participation

Screenshot 📸

  • My fix has changed something on UI;

Copilot Summary

copilot:summary

copilot:poem

@kodabot
Copy link
Collaborator

kodabot commented Dec 19, 2023

SUCCESS @hassnian PR for issue #8575 which is assigned to you. Please wait for review and don't hesitate to grab another issue in the meantime!

Copy link

netlify bot commented Dec 19, 2023

Deploy Preview for koda-canary ready!

Name Link
🔨 Latest commit 04e2ceb
🔍 Latest deploy log https://app.netlify.com/sites/koda-canary/deploys/65844146fd52fe000957a4c9
😎 Deploy Preview https://deploy-preview-8668--koda-canary.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

reviewpad bot commented Dec 19, 2023

AI-Generated Summary: This pull request involves updates for handling email confirmation in the application. It has brought changes over six files which include components/collection/drop/Generative.vue, components/collection/drop/modal/ConfirmEmail.vue, components/collection/drop/modal/DropConfirmModal.vue, and locales/en.json. It also created two new files - components/collection/drop/modal/ConfirmEmail.vue and public/email-subscription.svg. There has been a major change in the Generative.vue, implementing functions for email subscription and checking subscription. Also, a new Vue component for ConfirmEmail has been introduced. The changes are oriented towards adding functionality for both subscribing to an email and confirming the subscription. Additionally, this commit has also updated some labels in the locale file and introduced new utility functions in utils/newsletter.ts for subscribing and getting subscription status for an email. Overall, the update improves the email subscription and confirmation feature in the application.

@reviewpad reviewpad bot added the medium Pull request is medium label Dec 19, 2023
@reviewpad reviewpad bot added large Pull request is large and removed medium Pull request is medium labels Dec 20, 2023
@hassnian hassnian marked this pull request as ready for review December 20, 2023 09:48
@hassnian hassnian requested a review from a team as a code owner December 20, 2023 09:48
@hassnian hassnian requested review from roiLeo and Jarsen136 and removed request for a team December 20, 2023 09:48
@Jarsen136 Jarsen136 requested a review from prury December 20, 2023 10:37
Copy link
Contributor

@roiLeo roiLeo left a comment

Choose a reason for hiding this comment

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

dark-mode svg?

@hassnian
Copy link
Contributor Author

hassnian commented Dec 20, 2023

@prury pls test the following scenarios

  • current user has no email subscription registered -> first will see the enter email step
  • user has already subscribed -> user could've entered their email here
    CleanShot 2023-12-20 at 15 32 44@2x
    they will see email confirmation step if the email is not confirmed , if it's , it will start minting
  • user has already confirmed the email , minting will start immediately

it might be hard to test , but this is how it should work

thanks

@exezbcz
Copy link
Member

exezbcz commented Dec 20, 2023

  • user has already subscribed -> user could've entered their email here

or on a previous drop

@vikiival
Copy link
Member

Deployed enjoy

https://github.com/kodadot/workers/actions/runs/7274782427

@hassnian
Copy link
Contributor Author

dark-mode svg?

added
CleanShot 2023-12-20 at 16 53 57@2x

Copy link
Contributor

@roiLeo roiLeo left a comment

Choose a reason for hiding this comment

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

smoll, otherwise lgtm

</template>

<script setup lang="ts">
import ModalIdentityItem from '@/components/shared/ModalIdentityItem.vue'
Copy link
Contributor

Choose a reason for hiding this comment

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

auto imported

Suggested change
import ModalIdentityItem from '@/components/shared/ModalIdentityItem.vue'


<hr class="m-0 mb-2 mt-5" />

<div class="capitalize is-size-7 has-text-k-grey">
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<div class="capitalize is-size-7 has-text-k-grey">
<div class="capitalize text-xs text-k-grey">


onMounted(() => {
if (preferencesStore.getNewsletterSubscription.confirmed) {
emailConfirmed.value = true
Copy link
Contributor

Choose a reason for hiding this comment

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

make this value computed instead?


export async function getSubscription(email: string) {
try {
return api<SubscriptionByEmailResponse>(`/subscribe/${email}`, {
Copy link
Contributor

Choose a reason for hiding this comment

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

no await?


export async function resendConfirmationEmail(email: string) {
try {
return api('/subscribe/resend-confirmation', {
Copy link
Contributor

Choose a reason for hiding this comment

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

no await?

@yangwao
Copy link
Member

yangwao commented Dec 20, 2023

Testing at

@prury prury added the S-changes-requested-🤞 PR is almost good to go, just some fine tunning label Dec 20, 2023
@hassnian
Copy link
Contributor Author

hassnian commented Dec 21, 2023

I've used [email protected] could be possible doesn't handle well?

seems like an issue on beehiiv's end , that endpoint doesn't handle emails with special chars

email is registered
CleanShot 2023-12-21 at 11 57 29@2x

but when you try to get it using their api , 404 is returned
CleanShot 2023-12-21 at 11 54 54@2x

switched to using subscription id -> kodadot/workers#234

@yangwao
Copy link
Member

yangwao commented Dec 21, 2023

let's see if it build oka

@yangwao
Copy link
Member

yangwao commented Dec 21, 2023

locales/en.json Outdated Show resolved Hide resolved
Copy link

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

codeclimate bot commented Dec 21, 2023

Code Climate has analyzed commit 04e2ceb and detected 0 issues on this pull request.

View more on Code Climate.

@yangwao
Copy link
Member

yangwao commented Dec 21, 2023

Thanks!
pay 80 usd

@yangwao
Copy link
Member

yangwao commented Dec 21, 2023

😍 Perfect, I’ve sent the payout
💵 $80 @ 7.63 USD/DOT ~ 10.485 $DOT
🧗 13QUj3pZyFNfYj4AM336hRdyLQbevj5H3sR4PKmLEXLdwZhh
🔗 0x18755e46370f747497078720ac315cea96bfc627078e1a8d50184a030ae49bec

🪅 Let’s grab another issue and get rewarded!
🪄 github.com/kodadot/nft-gallery/issues

@yangwao yangwao added the paid pull-request has been paid label Dec 21, 2023
@yangwao
Copy link
Member

yangwao commented Dec 21, 2023

green
image

@yangwao yangwao merged commit e6736bd into kodadot:main Dec 21, 2023
15 checks passed
@hassnian hassnian deleted the issue-8575 branch December 21, 2023 13:53
This was referenced Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
large Pull request is large paid pull-request has been paid S-changes-requested-🤞 PR is almost good to go, just some fine tunning waiting-for-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Free drops requires activated email
8 participants