-
Notifications
You must be signed in to change notification settings - Fork 351
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
Improve styling of new sidebar guides #1406
Conversation
package.json
Outdated
@@ -29,7 +29,6 @@ | |||
"e2e-local": "CYPRESS_E2E_TEST_ENV=\"local\" cypress run", | |||
"e2e-local-open": "CYPRESS_E2E_TEST_ENV=\"local\" cypress open", | |||
"format": "prettier-eslint --write 'src/**/!(*.min).{js,jsx,ts,tsx,css,json}' 'e2e_tests/**/*.{js,jsx,ts,tsx,css,json}' 'scripts/**/*.{js,jsx,ts,tsx,css,json}' 'build_scripts/**/*.{js,jsx,ts,tsx,css,json}'", | |||
"jest": "jest --coverage", |
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.
Without this in package.json we can run yarn jest
to run jest without flags.
@@ -3,9 +3,7 @@ import styled from 'styled-components' | |||
export const NoBulletsUl = styled.div` | |||
list-style-type: none; | |||
` | |||
export const BulletsInsideLi = styled.li` |
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.
unused
@@ -437,6 +437,9 @@ export const StyledSidebarSlide = styled.div.attrs({ | |||
list-style-position: inside; | |||
padding-left: 0; | |||
margin-top: 0.5em; | |||
p { | |||
display: inline-block; |
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.
Before we added list-style-position: inside;
in a
type DotDotDot = '...' | ||
|
||
const range = (from: number, to: number) => | ||
Array.from({ length: from ? to - from + 1 : to }, (_, i) => i + from) |
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 it's better to use the lodash range instead
@@ -19,7 +19,7 @@ import React, { useState } from 'react' | |||
import styled from 'styled-components' | |||
|
|||
const StyledHeaderText = styled.div` | |||
font-family: 'Open Sans'; | |||
font-family: ${props => props.theme.drawerHeaderFontFamily}; |
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.
Adds fallback fonts, so we don't get as drastic font flashes
|
||
/* global Cypress, cy, before */ | ||
|
||
describe('Play command', () => { |
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.
Misleading name of this test suite! ;-)
<> | ||
{paginationHelper(itemCount, selectedIndex).map( | ||
(slideIndexOrDots, index) => { | ||
if (slideIndexOrDots === '...') { |
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.
Since you've already declared a type for this, can't you use that or a const? Feels like it'd make it easier to change the dots later if the literals weren't mixed throughout the code...
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 considered using null
instead 🤔
954960b
to
61845a4
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.
LGTM Love the TDD on the pagination component
Preview @ http://guide_polish.surge.sh
Problems addressed:
I'll annotate the source as to what solves what.