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

[TAS-2734]💄 Display DRM information on product page #1989

Merged
merged 10 commits into from
Dec 31, 2024

Conversation

AuroraHuang22
Copy link
Contributor

截圖 2024-12-18 上午8 37 30

截圖 2024-12-18 上午8 29 51

Copy link

AuroraHuang22 added a commit that referenced this pull request Dec 18, 2024
'shadow-md',
]"
>
<h4 class="font-600 text-dark-gray">{{ tooltipTitle }}</h4>
Copy link
Member

Choose a reason for hiding this comment

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

Not sure if we want to use h* tag on hover tooltips

AuroraHuang22 added a commit that referenced this pull request Dec 20, 2024
AuroraHuang22 added a commit that referenced this pull request Dec 24, 2024
Comment on lines 2 to 20
<svg
width="16"
height="16"
viewBox="0 0 16 16"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<g clip-path="url(#clip0_2791_3213)">
<path
d="M7.33334 11.3333H8.66667V7.33334H7.33334V11.3333ZM8 1.33334C4.32 1.33334 1.33334 4.32001 1.33334 8.00001C1.33334 11.68 4.32 14.6667 8 14.6667C11.68 14.6667 14.6667 11.68 14.6667 8.00001C14.6667 4.32001 11.68 1.33334 8 1.33334ZM8 13.3333C5.06 13.3333 2.66667 10.94 2.66667 8.00001C2.66667 5.06001 5.06 2.66668 8 2.66668C10.94 2.66668 13.3333 5.06001 13.3333 8.00001C13.3333 10.94 10.94 13.3333 8 13.3333ZM7.33334 6.00001H8.66667V4.66668H7.33334V6.00001Z"
fill="currentColor"
/>
</g>
<defs>
<clipPath id="clip0_2791_3213">
<rect width="16" height="16" fill="white" />
</clipPath>
</defs>
</svg>
Copy link
Member

Choose a reason for hiding this comment

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

Try optimize the SVG with https://jakearchibald.github.io/svgomg/ and also remove width & height attribute

Comment on lines 37 to 55
tooltipsContent() {
return this.isDownloadable
? {
title: this.$t(
'nft_details_page_label_access_methods_tooltips_title_drm_free'
),
text: this.$t(
'nft_details_page_label_access_methods_tooltips_text_drm_free'
),
}
: {
title: this.$t(
'nft_details_page_label_access_methods_tooltips_title_drm'
),
text: this.$t(
'nft_details_page_label_access_methods_tooltips_text_drm'
),
};
},
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
tooltipsContent() {
return this.isDownloadable
? {
title: this.$t(
'nft_details_page_label_access_methods_tooltips_title_drm_free'
),
text: this.$t(
'nft_details_page_label_access_methods_tooltips_text_drm_free'
),
}
: {
title: this.$t(
'nft_details_page_label_access_methods_tooltips_title_drm'
),
text: this.$t(
'nft_details_page_label_access_methods_tooltips_text_drm'
),
};
},
tooltipContent() {
return this.isDownloadable
? {
title: this.$t(
'nft_details_page_label_access_methods_tooltip_title_drm_free'
),
text: this.$t(
'nft_details_page_label_access_methods_tooltip_text_drm_free'
),
}
: {
title: this.$t(
'nft_details_page_label_access_methods_tooltip_title_drm'
),
text: this.$t(
'nft_details_page_label_access_methods_tooltip_text_drm'
),
};
},

@mouseenter="hoverTooltips"
>
<IconInfo />
<NFTBookTooltips
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
<NFTBookTooltips
<NFTBookTooltip


<script>
export default {
name: 'NFTBookTooltips',
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
name: 'NFTBookTooltips',
name: 'NFTBookTooltip',

Comment on lines 74 to 77
onclickShowTooltips() {
this.showTooltips = true;
logTrackerEvent(this, 'NFTBook', 'TooltipsClicked', '', 1);
},
Copy link
Member

Choose a reason for hiding this comment

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

Should also emit an event for the outermost page to log event

<div
v-if="tooltipText"
class="cursor-pointer laptop:hidden"
@click="onclickShowTooltips"
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
@click="onclickShowTooltips"
@click="onclickShowTooltip"

Comment on lines 71 to 76
hoverTooltips() {
logTrackerEvent(this, 'NFTBook', 'TooltipsHover', '', 1);
},
onclickShowTooltips() {
this.showTooltips = true;
logTrackerEvent(this, 'NFTBook', 'TooltipsClicked', '', 1);
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
hoverTooltips() {
logTrackerEvent(this, 'NFTBook', 'TooltipsHover', '', 1);
},
onclickShowTooltips() {
this.showTooltips = true;
logTrackerEvent(this, 'NFTBook', 'TooltipsClicked', '', 1);
hoverTooltip() {
logTrackerEvent(this, 'NFTBook', 'TooltipHover', '', 1);
},
onclickShowTooltip() {
this.showTooltip = true;
logTrackerEvent(this, 'NFTBook', 'TooltipClicked', '', 1);

Comment on lines 78 to 80
closeTooltips() {
this.showTooltips = false;
},
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
closeTooltips() {
this.showTooltips = false;
},
closeTooltip() {
this.showTooltip = false;
},

Comment on lines 671 to 674
"nft_details_page_label_access_methods_tooltips_text_drm": "Refers to eBooks that have digital rights management technology, allowing readers to open and read the content on our site.",
"nft_details_page_label_access_methods_tooltips_title_drm": "DRM Content",
"nft_details_page_label_access_methods_tooltips_text_drm_free": "Refers to eBooks without digital rights management technology, allowing readers to freely download and transfer the eBook to different devices.",
"nft_details_page_label_access_methods_tooltips_title_drm_free": "DRM-Free Content",
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
"nft_details_page_label_access_methods_tooltips_text_drm": "Refers to eBooks that have digital rights management technology, allowing readers to open and read the content on our site.",
"nft_details_page_label_access_methods_tooltips_title_drm": "DRM Content",
"nft_details_page_label_access_methods_tooltips_text_drm_free": "Refers to eBooks without digital rights management technology, allowing readers to freely download and transfer the eBook to different devices.",
"nft_details_page_label_access_methods_tooltips_title_drm_free": "DRM-Free Content",
"nft_details_page_label_access_methods_tooltip_text_drm": "Refers to eBooks that have digital rights management technology, allowing readers to open and read the content on our site.",
"nft_details_page_label_access_methods_tooltips_title_drm": "DRM Content",
"nft_details_page_label_access_methods_tooltip_text_drm_free": "Refers to eBooks without digital rights management technology, allowing readers to freely download and transfer the eBook to different devices.",
"nft_details_page_label_access_methods_tooltip_title_drm_free": "DRM-Free Content",

<div
v-if="tooltipText"
class="relative z-[300] hidden group laptop:block"
@mouseenter="hoverTooltips"
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
@mouseenter="hoverTooltips"
@mouseenter="hoverTooltip"

AuroraHuang22 added a commit that referenced this pull request Dec 27, 2024
@AuroraHuang22 AuroraHuang22 requested a review from nwingt December 27, 2024 03:30
Comment on lines 1 to 15
<template>
<svg fill="none" viewBox="0 0 16 16">
<g clip-path="url(#a)">
<path
fill="currentColor"
d="M7.333 11.333h1.334v-4H7.333v4Zm.667-10A6.67 6.67 0 0 0 1.333 8 6.67 6.67 0 0 0 8 14.667 6.67 6.67 0 0 0 14.667 8 6.67 6.67 0 0 0 8 1.333Zm0 12A5.34 5.34 0 0 1 2.667 8 5.34 5.34 0 0 1 8 2.667 5.34 5.34 0 0 1 13.333 8 5.34 5.34 0 0 1 8 13.333ZM7.333 6h1.334V4.667H7.333V6Z"
/>
</g>
<defs>
<clipPath id="a">
<path fill="#fff" d="M0 0h16v16H0z" />
</clipPath>
</defs>
</svg>
</template>
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
<template>
<svg fill="none" viewBox="0 0 16 16">
<g clip-path="url(#a)">
<path
fill="currentColor"
d="M7.333 11.333h1.334v-4H7.333v4Zm.667-10A6.67 6.67 0 0 0 1.333 8 6.67 6.67 0 0 0 8 14.667 6.67 6.67 0 0 0 14.667 8 6.67 6.67 0 0 0 8 1.333Zm0 12A5.34 5.34 0 0 1 2.667 8 5.34 5.34 0 0 1 8 2.667 5.34 5.34 0 0 1 13.333 8 5.34 5.34 0 0 1 8 13.333ZM7.333 6h1.334V4.667H7.333V6Z"
/>
</g>
<defs>
<clipPath id="a">
<path fill="#fff" d="M0 0h16v16H0z" />
</clipPath>
</defs>
</svg>
</template>
<template>
<svg xmlns="http://www.w3.org/2000/svg" fill="none">
<path
fill="currentColor"
d="M7.333 11.333h1.334v-4H7.333v4Zm.667-10A6.67 6.67 0 0 0 1.333 8 6.67 6.67 0 0 0 8 14.667 6.67 6.67 0 0 0 14.667 8 6.67 6.67 0 0 0 8 1.333Zm0 12A5.34 5.34 0 0 1 2.667 8 5.34 5.34 0 0 1 8 2.667 5.34 5.34 0 0 1 13.333 8 5.34 5.34 0 0 1 8 13.333ZM7.333 6h1.334V4.667H7.333V6Z"
/>
</svg>
</template>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@AuroraHuang22 AuroraHuang22 requested a review from nwingt December 30, 2024 02:57
@williamchong williamchong merged commit a813b96 into likecoin:develop Dec 31, 2024
1 check 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.

3 participants