-
Notifications
You must be signed in to change notification settings - Fork 210
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
MNTOR-1809 - Add chart into dashboard top banner #3232
Conversation
@@ -234,11 +234,22 @@ $text-body-lg: 400 clamp(16px, 1.5svw, 18px) / 1.5 var(--font-inter), sans-serif | |||
$text-body-md: 400 clamp(14px, 1.3svw, 16px) / 1.5 var(--font-inter), sans-serif; | |||
$text-body-sm: 400 clamp(12px, 1.14svw, 14px) / 1.5 var(--font-inter), | |||
sans-serif; | |||
$text-body-xs: 400 clamp(10px, 0.975svw, 12px) / 1.5 var(--font-inter), | |||
sans-serif; | |||
$text-body-xs: 400 12px / 1.5 var(--font-inter), sans-serif; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the clamp
on this variable, since the font's already so small it was illegible at 10px
.
Ah, and a general comment since I've been meaning to file this for a while… |
I agree it's a bit hard to distinguish, if we change it we should be mindful of color insensitive vision (aka "color blindness"), there's an MDN article and explanation about how to use the Accessibility devtools: https://developer.mozilla.org/en-US/docs/Web/Accessibility/Understanding_Colors_and_Luminance I took a quick look using the accessibility tools and the current chart was legible overall so I wouldn't want to make us worse for some folks while trying to make it better :) |
859516a
to
78a953a
Compare
locales-pending/premium.ftl
Outdated
modal-active-number-of-exposures-title = About your number of active exposures | ||
# Variables: | ||
# $limit (number) - Number of email addresses included in the plan | ||
modal-active-number-of-exposures-part-one = This chart includes the total number of times we found each type of data exposed across all data broker profiles and all data breaches for up to { $limit } email addresses that you are currently monitoring. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make this a plural string (see issue here)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in d7844bd.
4d9e3c2
to
993881d
Compare
307b52d
to
919f46b
Compare
src/app/(proper_react)/redesign/(authenticated)/user/dashboard/DashboardTopBanner.tsx
Show resolved
Hide resolved
src/app/(proper_react)/redesign/(authenticated)/user/dashboard/Dashboard.test.tsx
Show resolved
Hide resolved
3ad5937
to
ebfcd2c
Compare
@@ -59,6 +59,7 @@ financial-investments = Financial investments | |||
financial-transactions = Financial transactions | |||
fitness-levels = Fitness levels | |||
flights-taken = Flights taken | |||
full-names = Full name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I missed this one in review (not sure if it was there when I reviewed, but that's not relevant).
All categories in this file are plurals. Also, why is this category being added in this PR? Just a coincidence?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@flodolo Me thinks it's related to this: #3244 (comment)
We have a bunch of these breach categories in the new dashboard UI now, so rather than add duplicate strings for localizers to localize, we reused the existing translated strings in locales/*/data-classes.ftl (although yes, that does slightly blur the fact that 99.999% of the values in that file are HIBP specific except this one).
git grep -n "full-names" | cat
locales/en/data-classes.ftl:62:full-names = Full name
src/app/(proper_react)/redesign/(authenticated)/user/dashboard/Dashboard.stories.tsx:158: { "full-names": 98 },
src/app/functions/server/dashboard.ts:40: fullNames: "full-names",
And yes, good callout that now there is some vague pluralizing where the ID is plural and the value is singular.
Not sure which way to fix that one, or if you think we should remove "full-names" entirely and move it into one of the files in /locales-pending/*.ftl. Plural would be more consistent with the rest of the values in data-classes.ftl, but I'm not clear on if that'd make the dashboard UI less clear, so I defer to UX/content/@codemist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reusing strings is a bad idea, especially if we mix them from different sources. Some locales, for example, are translating categories lowercase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's less than ideal in terms of localizability, but one way to minimize the impact would be to capitalize the first letter of the category (using a locale-sensitive library) when used in a different context.
References:
Jira: MNTOR-1809
Description
This adds the chart UI in the dashboard top banner. It also switches between two states:
This view before scanning:
This view after scanning:
Modal:
Checklist (Definition of Done)