-
Notifications
You must be signed in to change notification settings - Fork 179
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
Dashboard: Empty State Redesign #6616
Conversation
Size Change: +1.57 kB (0%) Total Size: 1.21 MB
ℹ️ View Unchanged
|
Codecov Report
@@ Coverage Diff @@
## main #6616 +/- ##
===========================================
+ Coverage 68.42% 82.88% +14.45%
===========================================
Files 1120 1124 +4
Lines 19894 19934 +40
===========================================
+ Hits 13613 16522 +2909
+ Misses 6281 3412 -2869
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
NICE
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.
✨
{search?.keyword | ||
? sprintf( | ||
/* translators: %s: search term. */ | ||
__( | ||
'Sorry, we couldn\'t find any results matching "%s"', | ||
'web-stories' | ||
), | ||
search.keyword | ||
) | ||
: __('No templates currently available', 'web-stories')} | ||
<Headline | ||
size={THEME_CONSTANTS.TYPOGRAPHY.PRESET_SIZES.SMALL} | ||
as="h3" | ||
> | ||
{search?.keyword | ||
? sprintf( | ||
/* translators: %s: search term. */ | ||
__( | ||
'Sorry, we couldn\'t find any results matching "%s"', | ||
'web-stories' | ||
), | ||
search.keyword | ||
) | ||
: __('No templates currently available.', 'web-stories')} | ||
</Headline> | ||
{!search?.keyword && ( | ||
<Button | ||
type={BUTTON_TYPES.PRIMARY} | ||
size={BUTTON_SIZES.MEDIUM} | ||
as="a" | ||
href={newStoryURL} | ||
> | ||
{__('Create a new Story', 'web-stories')} | ||
</Button> | ||
)} |
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.
💭 Loading state:
I think we should show a loading state or something indicating that templates are loading to the user so that in the event of a slow connection we show them that things are happening in the background.
Maybe we should add a ticket for this?
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.
yes! I thought there was a ticket for this. It's been brought up a few times now. couldn't find a ticket so i made one. #6622
<Button | ||
type={BUTTON_TYPES.PRIMARY} | ||
size={BUTTON_SIZES.MEDIUM} | ||
as="a" | ||
href={newStoryURL} | ||
> | ||
{__('Create a new Story', 'web-stories')} | ||
</Button> |
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.
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.
yes! this fix will come in with the dashboard grid PR #6588
e688592
to
6615b3b
Compare
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.
Looks and works great!
<svg width="274" height="118" viewBox="0 0 274 118" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
<path d="M59.6794 117.706L8.55191 106.934C2.50496 105.66 -0.950525 99.2608 1.30073 93.5057L2.4815 90.4872C3.80608 87.1011 6.86419 84.7008 10.468 84.2185L89.2625 73.675C90.1304 73.5588 90.9792 73.3292 91.7873 72.992L173.848 38.7482C176.51 37.6373 179.523 37.73 182.111 39.0027L238.407 66.6783C238.843 66.8925 239.293 67.0747 239.756 67.2234L266.596 75.86C275.728 78.7987 275.883 91.664 266.824 94.822L240.295 104.07C239.476 104.355 238.624 104.533 237.759 104.599L62.4973 117.892C61.5539 117.964 60.6052 117.901 59.6794 117.706Z" fill="#F4F2EF"/> | ||
<path fill-rule="evenodd" clip-rule="evenodd" d="M224 26C224 23.7909 225.791 22 228 22H230C232.209 22 234 23.7909 234 26V57H238V44C238 42.8954 238.895 42 240 42H241C242.105 42 243 42.8954 243 44V59V60C243 61.1046 242.105 62 241 62H240H234V79H224V49H218H217C215.895 49 215 48.1046 215 47V46V31C215 29.8954 215.895 29 217 29H218C219.105 29 220 29.8954 220 31V44H224V26Z" fill="#FBBC04"/> | ||
<path fill-rule="evenodd" clip-rule="evenodd" d="M120.857 53.1785C120.857 51.995 121.817 51.0356 123 51.0356C124.184 51.0356 125.143 51.995 125.143 53.1785V67.4287H126.857V62.0714C126.857 61.4797 127.337 61 127.929 61C128.52 61 129 61.4797 129 62.0714V68.5C129 68.553 128.996 68.6052 128.989 68.6561C128.981 68.7118 128.968 68.7661 128.952 68.8186C128.816 69.2548 128.409 69.5716 127.929 69.5716H125.143V75.4642H120.857V67.5716H118.071C117.613 67.5716 117.221 67.2831 117.068 66.8777C117.024 66.7602 117 66.6329 117 66.5V60.0714C117 59.4797 117.48 59 118.071 59C118.663 59 119.143 59.4797 119.143 60.0714V65.4287H120.857V53.1785Z" fill="#FBBC04"/> | ||
<path fill-rule="evenodd" clip-rule="evenodd" d="M64.7857 8C64.7857 3.58172 68.3674 0 72.7857 0H73.2143C77.6326 0 81.2143 3.58172 81.2143 8V42.6428H87.7858V22C87.7858 19.7909 89.5766 18 91.7858 18H92C94.2092 18 96.0001 19.7909 96.0001 22V46.8571C96.0001 49.0663 94.2092 50.8571 92.0001 50.8571H91.7858L91.769 50.8571H81.2143V93.6429H64.7857V78.8571H54.2319C54.2261 78.8571 54.2202 78.8571 54.2143 78.8571H54C52.8954 78.8571 51.8954 78.4094 51.1716 77.6856C50.4477 76.9617 50 75.9617 50 74.8571V50C50 47.7909 51.7909 46 54 46H54.2143C56.4234 46 58.2143 47.7909 58.2143 50V70.6428H64.7857V8Z" fill="#FBBC04"/> | ||
<circle cx="213" cy="72" r="13" fill="#4285F4"/> | ||
</svg> |
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.
If we ever wanted to make these svgs react components instead of using the svg loader, we could just make these one svg that changes intertnal path fills based off of props. Not something you need to change here, but definitely a benefit in the future if we ever want to head that direction
@@ -124,7 +124,7 @@ describe('My Stories <Content />', function () { | |||
{ features: { enableInProgressStoryActions: false } } | |||
); | |||
|
|||
expect(getByText('Create a story to get started!')).toBeInTheDocument(); | |||
expect(getByText('Start telling Stories.')).toBeInTheDocument(); |
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've been running across tests breaking for simple text updates and feel like it shouldn't happen so often. Maybe it's better practice to add testid
s vs getting elements by their text? Thoughts?
Don't need to change it here, but curious about ppls thoughts as like a future best practice to start implementing or not
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.
good idea, either testids or sourcing text from 1 place, it'd be great to feed strings to pages from json or something. make it easier for text to be updated by non engineering.
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.
Ooo yea that'd also be dope
Context
Updates the view when there are no stories to see based on: https://www.figma.com/file/NHHMwIfxMnz39NxqkrFb7R/Stories-Post-Stable?node-id=6464%3A521842
(from figma Mar 4, 2021 9:20 am MST)
Summary
Updates dashboard empty state.
Relevant Technical Choices
To-do
User-facing changes
Old (Staging/Main)
New (this branch)
Testing Instructions
author
, password is same as admin unless you changed it) to see the no stories/blank canvas state without wiping your local environment. Discussion with Pascal here Dashboard: author does not see drafts #6613 makes me think this is a bug but for now it's really helpful for testing this!)QA
See above.
UAT
This PR can be tested by following these steps:
Reviews
Does this PR have a security-related impact?
No
Does this PR change what data or activity we track or use?
No
Does this PR have a legal-related impact?
No
Checklist
Type: XYZ
label to the PRFixes #6437