Skip to content

Hide label of verification badge in a table for mobile screens#2003

Merged
lukaw3d merged 1 commit into
masterfrom
kaja/mobile-verification-badge
Jun 5, 2025
Merged

Hide label of verification badge in a table for mobile screens#2003
lukaw3d merged 1 commit into
masterfrom
kaja/mobile-verification-badge

Conversation

@kaja-osojnik

Copy link
Copy Markdown
Contributor

Implements: #1992

Before:
Screenshot 2025-05-30 at 20 26 46

After:
Screenshot 2025-05-30 at 20 26 22

@github-actions

github-actions Bot commented May 30, 2025

Copy link
Copy Markdown

Deployed to Cloudflare Pages

Latest commit: 4df8d8360f943857ce3c3419fb1c439c2fe25777
Status:✅ Deploy successful!
Preview URL: https://ebd11e9c.oasis-explorer.pages.dev
Alias: https://pr-2003.oasis-explorer.pages.dev

@kaja-osojnik kaja-osojnik changed the title Remove label of verification badge in a table for mobile screens Hide label of verification badge in a table for mobile screens May 30, 2025

@buberdds buberdds left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  1. There is some     spacing in ContractStatus which is now more visible with compact badges in tables. Maybe it's better to render these extra spaces conditionally?

  2. I think we don't need StatusBadge.tsx changes. Once reverted I would change prop name to hideLabel (or opposite withLabel) and just change ContractStatus to sth like
    return <StatusBadge label={hideLabel ? '' : statusLabel} variant={statusVariant} hideLabel={hideLabel} />

Comment thread src/app/components/common/StatusBadge.tsx Outdated
Comment thread src/app/components/common/StatusBadge.tsx Outdated
@kaja-osojnik kaja-osojnik requested a review from buberdds June 2, 2025 16:32
Comment thread src/app/components/ContractVerificationIcon/index.tsx Outdated
Comment thread src/app/components/ContractVerificationIcon/index.tsx Outdated

@buberdds buberdds left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice, once two issues reported by Luka are fixed I am fine with merging.

@donouwens donouwens left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Design looks all good to me

const Component = noLink ? Box : (Link as React.ElementType)
const componentProps = noLink ? {} : sourcifyLinkProps

const hideLabelMobile = hideLabel && isMobile

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'll fix: table component should decide to hide label on mobile. Not ContractStatus, not VerificationIcon

<ContractStatus verificationLevel={verificationLevel} hideLabel={hideLabelMobile} />
</Component>
&nbsp; &nbsp;
{hideLabel && isMobile ? null : '\u00A0\u00A0'}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'll fix: spacing here is not related to label nor isMobile. It should be displayed depending on noLink

Comment on lines +61 to +63
[theme.breakpoints.down('sm')]: {
padding: 4,
},

@lukaw3d lukaw3d Jun 5, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'll fix: spacing here is not related to mobile. It should be displayed depending on hideLabel / (!!label in this component)

@lukaw3d lukaw3d force-pushed the kaja/mobile-verification-badge branch from 8ca2841 to 99fa4bb Compare June 5, 2025 19:34
Co-authored-by: lukaw3d <luka@oasisprotocol.org>
@lukaw3d lukaw3d force-pushed the kaja/mobile-verification-badge branch from 99fa4bb to 4df8d83 Compare June 5, 2025 19:36
@lukaw3d lukaw3d merged commit 0a09c81 into master Jun 5, 2025
9 checks passed
@lukaw3d lukaw3d deleted the kaja/mobile-verification-badge branch June 5, 2025 19:45
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.

4 participants