-
Notifications
You must be signed in to change notification settings - Fork 204
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
Add config option to display a clean onboarding look to users. #580
Conversation
4e4fb78
to
b19c719
Compare
<li class="sidebar-tutorial__list-item sidebar-tutorial__list-item--is-theme-clean"> | ||
<p class="sidebar-tutorial__list-item-content"> | ||
View annotations through your profile | ||
<i class="h-icon-account ng-scope"></i> |
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.
What is the ng-scope
for here?
Codecov Report
@@ Coverage Diff @@
## master #580 +/- ##
==========================================
+ Coverage 90.93% 90.99% +0.06%
==========================================
Files 132 132
Lines 5337 5499 +162
Branches 928 967 +39
==========================================
+ Hits 4853 5004 +151
- Misses 484 495 +11
Continue to review full report at Codecov.
|
src/styles/sidebar-tutorial.scss
Outdated
|
||
.sidebar-tutorial__list-item--is-theme-clean::before { | ||
content: counter(sidebar-tutorial__list) "."; | ||
display: table-cell; /* aha! */ |
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.
What is this for? (ie. What is the "aha" ;) ?)
src/styles/sidebar-tutorial.scss
Outdated
border: none; | ||
border-radius: 3px; | ||
color: #fff; | ||
display: -ms-flexbox; |
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.
CSS property values should be unprefixed (ie. display: flex
). -ms-flexbox
is a legacy value for IE 10/11. Our CSS preprocessor will add prefixes for the browsers we support. The exceptions are a few rare properties that only exist in one browser.
src/styles/sidebar-tutorial.scss
Outdated
.sidebar-tutorial__list-item-content { | ||
margin-top: 1em; /* Put vertical space in-between list items, equal to the | ||
space between normal paragraphs. | ||
Note: This also puts the same amount of space above the | ||
first list item (i.e. between the list and whatever's | ||
above it). */ | ||
} | ||
|
||
.sidebar-tutorial__list-item-annotate { | ||
background-color: #b9d9fa; |
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.
Is this just for testing purposes, do we have variables that we'll eventually use here?
3d6f6c1
to
7ca8450
Compare
@robertknight I cleaned up all the placeholders and copy-paste errors. Please take a look! |
7ca8450
to
ccde896
Compare
Note for future reference: For testing purposes in a local dev environment, the only way the sidebar tutorial can be re-enabled for a user who has dismissed it currently is via a direct DB update: docker run -it --link postgres:postgres --rm postgres sh -c 'exec psql -h "$POSTGRES_PORT_5432_TCP_ADDR" -p "$POSTGRES_PORT_5432_TCP_PORT" -U postgres '
postgres=# update "user" set sidebar_tutorial_dismissed = false; |
<div class="sidebar-tutorial__list-item-content"> | ||
Select some text to | ||
<span class="sidebar-tutorial__list-item-annotate">annotate</span> | ||
<svg-icon width="3px" height="10px" class="sidebar-tutorial__list-item-cursor" name="'cursor'"></svg-icon> |
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.
The width
and height
properties here are redundant and can be removed since we're now applying the styling in CSS.
<li class="sidebar-tutorial__list-item sidebar-tutorial__list-item--is-theme-clean"> | ||
<div class="sidebar-tutorial__list-item-content sidebar-tutorial__list-item-content--is-theme-clean"> | ||
Create page level notes | ||
<button class="sidebar-tutorial__list-item-new-note-btn" h-branding="ctaBackgroundColor"> |
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.
Hmm ... this isn't actually clickable so it might be a bit surprising that it has the affordances of a button (eg. a cursor pointer).
- Use a variable instead of a hardcoded color for the "New note" button in the sidebar tutorial. - Remove unused `width` and `height` attributes. The icon's size is set via `width` and `height` properties in CSS.
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 were a couple of very minor code issues. In the interests of getting this out in a client release ASAP for testing I've pushed a commit with fixes for them.
I do think we should revisit the naming of all the new config options before we commit to supporting them, but we can do that while eLife are playing around with it.
src/styles/sidebar-tutorial.scss
Outdated
} | ||
|
||
.sidebar-tutorial__list-item-new-note-btn { | ||
background-color: #626262; |
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.
This should use the $color-dove-gray
variable for consistency with other elements that are styled using the same palette element from the color palette.
@@ -23,6 +23,7 @@ function configFrom(window_) { | |||
disableToolbarHighlightsBtn: settings.hostPageSetting('disableToolbarHighlightsBtn'), | |||
disableToolbarNewNoteBtn: settings.hostPageSetting('disableToolbarNewNoteBtn'), | |||
disableBucketBar: settings.hostPageSetting('disableBucketBar'), | |||
enableCleanOnboardingTheme: settings.hostPageSetting('enableCleanOnboardingTheme'), |
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.
Perhaps for both consistency with how we are handling the "New note" button and also to make it clear that this isn't yet an officially supported setting, we ought to name it something like enableExperimentalNewOnboarding
? 🤔 .
The new-look onboarding actually works fine whether or not the "clean" theme is being used, so perhaps we can consider it a separate thing.
The new note button in the onboarding tutorial shouldn't be a button because it isn't clickable. It is there to teach the user what to look for to create a new note. Turn the button element into a span with the same styling as the new note button which appears in the 'Page Notes' tab. See hypothesis/product-backlog#351 and #580 (comment)
No description provided.