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

fix: Minting NFT - "dancing" #11082

Merged
merged 3 commits into from
Oct 7, 2024
Merged

fix: Minting NFT - "dancing" #11082

merged 3 commits into from
Oct 7, 2024

Conversation

hassnian
Copy link
Contributor

@hassnian hassnian commented Oct 5, 2024

PR Type

  • Bugfix
  • Feature
  • Refactoring

Context

if you open the signing modal the second time, that section is not fixed starts "dancing"

How to reproduce

<template>
  <SigningModal
    :title="'asd'"
    :is-loading="isLoading"
    :status="status"
  />

  <NeoButton @click="open">
    open
  </NeoButton>
</template>

<script lang="ts" setup>
import { NeoButton } from '@kodadot1/brick'
import type { TransactionStatus } from '@/composables/useTransactionStatus'

definePageMeta({
  layout: 'no-footer',
})

const isLoading = ref(false)
const status = ref(TransactionStatus.Unknown)
const opened = ref(false)

const sleep = (ms: number) => {
  return new Promise(resolve => setTimeout(resolve, ms))
}

const open = async () => {
  isLoading.value = true

  status.value = TransactionStatus.Casting
  await sleep(400)

  status.value = TransactionStatus.Broadcast
  await sleep(1000)

  status.value = TransactionStatus.Block
  await sleep(2000)

  if (opened.value) {
    return
  }

  status.value = TransactionStatus.Finalized
  opened.value = true
}
</script>

Screenshot 📸

  • My fix has changed something on UI;

CleanShot.2024-10-05.at.11.55.46.mp4

CleanShot.2024-10-05.at.11.53.54.mp4

Copy link

netlify bot commented Oct 5, 2024

Deploy Preview for koda-canary ready!

Name Link
🔨 Latest commit b1f2618
🔍 Latest deploy log https://app.netlify.com/sites/koda-canary/deploys/6703c0817c130c0007ffdf8a
😎 Deploy Preview https://deploy-preview-11082--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.

@hassnian hassnian marked this pull request as ready for review October 5, 2024 06:57
@hassnian hassnian requested a review from a team as a code owner October 5, 2024 06:57
@@ -82,15 +82,16 @@ const calculateTextContainerWidth = () => {
return
}

textContainerWidth.value = undefined

nextTick(() => {
const title = titleRef.value?.clientWidth || 0
const substitle = subtitleRef.value?.clientWidth || 0
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 substitle = subtitleRef.value?.clientWidth || 0
const subtitle = subtitleRef.value?.clientWidth || 0

= substitle && subtitlePlusDots > title
? `${subtitlePlusDots}px`
: undefined
if (substitle && subtitlePlusDots > title) {
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
if (substitle && subtitlePlusDots > title) {
if (subtitle && subtitlePlusDots > title) {

@vikiival
Copy link
Member

vikiival commented Oct 7, 2024

cc @hassnian there is typo in the subtitle word

@hassnian
Copy link
Contributor Author

hassnian commented Oct 7, 2024

cc @hassnian there is typo in the subtitle word

fixed 0dfd77e

Copy link

sonarcloud bot commented Oct 7, 2024

@vikiival vikiival merged commit 6dcd66d into kodadot:main Oct 7, 2024
21 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Minting NFT - "dancing"
3 participants