0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-24 18:07:17 +01:00

feat: no button muted alt (#11278)

* insight card primary alt

* lemon input side icon primary alt

* remove button muted alt

* turn on critical a11y testing for home page

* remove muted alt from scss

* de muteify the password input
This commit is contained in:
Paul D'Ambra 2022-08-17 08:43:40 +01:00 committed by GitHub
parent 5233a4ab0b
commit e30f824cda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 8 additions and 7 deletions

View File

@ -4,7 +4,8 @@ describe('a11y', () => {
it('home should have no accessibility violations', () => {
cy.get('[data-attr="menu-item-projecthomepage"]').click()
cy.injectAxe()
reportA11y({ includedImpacts: ['serious', 'critical'] }, 'home-page')
reportA11y({ includedImpacts: ['critical'] }, 'home-page-critical', false)
reportA11y({ includedImpacts: ['serious'] }, 'home-page-serious', true)
})
const sidebarItems = [

View File

@ -262,7 +262,7 @@ function InsightMeta({
icon={!areDetailsShown ? <IconSubtitles /> : <IconSubtitlesOff />}
onClick={() => setAreDetailsShown((state) => !state)}
type="tertiary"
status="muted-alt"
status="primary-alt"
size={showDetailsButtonLabel ? 'small' : undefined}
>
{showDetailsButtonLabel && `${!areDetailsShown ? 'Show' : 'Hide'} details`}

View File

@ -140,7 +140,7 @@
}
}
@each $status in ('default', 'primary', 'danger', 'primary-alt', 'muted-alt') {
@each $status in ('default', 'primary', 'danger', 'primary-alt') {
&.LemonButton--status-#{$status} {
color: var(--#{$status}, var(--primary));

View File

@ -13,7 +13,7 @@ import { LemonDivider } from '../LemonDivider'
import { capitalizeFirstLetter } from 'lib/utils'
import { urls } from 'scenes/urls'
const statuses: LemonButtonProps['status'][] = ['primary', 'danger', 'primary-alt', 'muted-alt']
const statuses: LemonButtonProps['status'][] = ['primary', 'danger', 'primary-alt']
const types: LemonButtonProps['type'][] = ['primary', 'secondary', 'tertiary']
export default {

View File

@ -16,7 +16,7 @@ export interface LemonButtonPropsBase
children?: React.ReactNode
type?: 'primary' | 'secondary' | 'tertiary'
/** What color scheme the button should follow */
status?: 'primary' | 'danger' | 'primary-alt' | 'muted' | 'muted-alt' | 'stealth'
status?: 'primary' | 'danger' | 'primary-alt' | 'muted' | 'stealth'
/** Whether hover style should be applied, signaling that the button is held active in some way. */
active?: boolean
/** URL to link to. */

View File

@ -100,7 +100,7 @@ export const LemonInput = React.forwardRef<HTMLInputElement, LemonInputProps>(fu
size="small"
noPadding
icon={passwordVisible ? <IconEyeHidden /> : <IconEyeVisible />}
status="muted-alt"
status="primary-alt"
tooltip={passwordVisible ? 'Hide password' : 'Show password'}
onClick={(e) => {
e.stopPropagation()
@ -117,7 +117,7 @@ export const LemonInput = React.forwardRef<HTMLInputElement, LemonInputProps>(fu
size="small"
noPadding
icon={<IconClose />}
status="muted-alt"
status="primary-alt"
tooltip="Clear input"
onClick={(e) => {
e.stopPropagation()