mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-12-19 03:31:32 +03:00
Fix heading order issues, exclusive of Accordion because there's a PR making major changes to that component's view currently open
This commit is contained in:
parent
2557361fab
commit
adb2d4bd87
@ -73,32 +73,18 @@ describe('UI tests', function () {
|
|||||||
|
|
||||||
const skippedRules = {
|
const skippedRules = {
|
||||||
'Accordion': ['heading-order', 'region'],
|
'Accordion': ['heading-order', 'region'],
|
||||||
'Balloon': ['color-contrast', 'heading-order', 'label'],
|
'Balloon': ['color-contrast', 'label'],
|
||||||
'Button': ['heading-order'],
|
'Checkbox': ['region'],
|
||||||
'Checkbox': ['heading-order', 'region'],
|
|
||||||
'ClickableSvg': ['heading-order'],
|
|
||||||
'ClickableText': ['heading-order'],
|
|
||||||
'Colors': ['heading-order'],
|
|
||||||
'Confetti': ['heading-order'],
|
|
||||||
'Container': ['heading-order'],
|
|
||||||
'DisclosureIndicator': ['heading-order'],
|
|
||||||
'Fonts': ['heading-order'],
|
|
||||||
'Heading': ['heading-order'],
|
|
||||||
'Loading': ['color-contrast'],
|
'Loading': ['color-contrast'],
|
||||||
'Menu': ['heading-order', 'region'],
|
'Menu': ['region'],
|
||||||
'Modal': ['region'],
|
'Modal': ['region'],
|
||||||
'Message': ['heading-order', 'region'],
|
'Message': ['region'],
|
||||||
'Page': ['color-contrast', 'heading-order', 'select-name'],
|
'Page': ['color-contrast', 'select-name'],
|
||||||
'RadioButton': ['duplicate-id', 'region'],
|
'RadioButton': ['duplicate-id', 'region'],
|
||||||
'SegmentedControl': ['heading-order', 'region'],
|
'SegmentedControl': ['region'],
|
||||||
'Select': ['label'],
|
'Select': ['label'],
|
||||||
'SideNav': ['heading-order'],
|
'Switch': ['aria-allowed-attr'],
|
||||||
'SortableTable': ['heading-order'],
|
|
||||||
'Switch': ['aria-allowed-attr', 'heading-order'],
|
|
||||||
'Table': ['heading-order'],
|
|
||||||
'Tabs': ['region'],
|
'Tabs': ['region'],
|
||||||
'Text': ['heading-order'],
|
|
||||||
'Tooltip': ['heading-order'],
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const specialProcessing = {
|
const specialProcessing = {
|
||||||
|
@ -59,7 +59,7 @@ viewExampleCode ellieLink component values =
|
|||||||
[ details
|
[ details
|
||||||
[]
|
[]
|
||||||
[ summary []
|
[ summary []
|
||||||
[ Heading.h4
|
[ Heading.h3
|
||||||
[ Heading.css [ Css.display Css.inline ]
|
[ Heading.css [ Css.display Css.inline ]
|
||||||
]
|
]
|
||||||
[ text example.sectionName ]
|
[ text example.sectionName ]
|
||||||
@ -87,7 +87,7 @@ viewExampleCode ellieLink component values =
|
|||||||
viewSection : String -> List (Html msg) -> Html msg
|
viewSection : String -> List (Html msg) -> Html msg
|
||||||
viewSection name children =
|
viewSection name children =
|
||||||
section [ css [ flex (int 1) ] ]
|
section [ css [ flex (int 1) ] ]
|
||||||
(Heading.h3 [] [ text name ]
|
(Heading.h2 [] [ text name ]
|
||||||
:: children
|
:: children
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ example =
|
|||||||
, viewLockedOnInsideCheckbox "styleguide-locked-on-inside-checkbox" state
|
, viewLockedOnInsideCheckbox "styleguide-locked-on-inside-checkbox" state
|
||||||
, viewDisabledCheckbox "styleguide-checkbox-disabled" state
|
, viewDisabledCheckbox "styleguide-checkbox-disabled" state
|
||||||
, viewMultilineCheckboxes state
|
, viewMultilineCheckboxes state
|
||||||
, h3 [] [ text "Premium Checkboxes" ]
|
, h2 [] [ text "Premium Checkboxes" ]
|
||||||
, viewPremiumCheckboxes state
|
, viewPremiumCheckboxes state
|
||||||
]
|
]
|
||||||
, categories = [ Inputs ]
|
, categories = [ Inputs ]
|
||||||
@ -140,7 +140,7 @@ viewMultilineCheckboxes : State -> Html Msg
|
|||||||
viewMultilineCheckboxes state =
|
viewMultilineCheckboxes state =
|
||||||
Html.section
|
Html.section
|
||||||
[ css [ Css.width (Css.px 500) ] ]
|
[ css [ Css.width (Css.px 500) ] ]
|
||||||
[ Html.h3 [] [ Html.text "Multiline Text in Checkboxes" ]
|
[ Html.h2 [] [ Html.text "Multiline Text in Checkboxes" ]
|
||||||
, let
|
, let
|
||||||
id =
|
id =
|
||||||
"styleguide-checkbox-multiline"
|
"styleguide-checkbox-multiline"
|
||||||
|
@ -91,7 +91,7 @@ example =
|
|||||||
, ( "sunshine", Colors.sunshine, "Yellow highlights, tips" )
|
, ( "sunshine", Colors.sunshine, "Yellow highlights, tips" )
|
||||||
]
|
]
|
||||||
|> viewColors
|
|> viewColors
|
||||||
, Heading.h3 [] [ Html.text "Background Highlight Colors" ]
|
, Heading.h2 [] [ Html.text "Background Highlight Colors" ]
|
||||||
, Text.mediumBody [ Text.plaintext "Background highlights should be used as the default highlight style because they are more noticeable and readable. The dark colors should be used in the case where headings need to harmonize with highlighted containers, such as in Guided Drafts." ]
|
, Text.mediumBody [ Text.plaintext "Background highlights should be used as the default highlight style because they are more noticeable and readable. The dark colors should be used in the case where headings need to harmonize with highlighted containers, such as in Guided Drafts." ]
|
||||||
, [ ( "highlightYellow", Colors.highlightYellow, "Yellow background highlights" )
|
, [ ( "highlightYellow", Colors.highlightYellow, "Yellow background highlights" )
|
||||||
, ( "highlightYellowDark", Colors.highlightYellowDark, "Dark yellow background highlights" )
|
, ( "highlightYellowDark", Colors.highlightYellowDark, "Dark yellow background highlights" )
|
||||||
@ -109,7 +109,7 @@ example =
|
|||||||
, ( "highlightBrownDark", Colors.highlightBrownDark, "Dark brown background highlights" )
|
, ( "highlightBrownDark", Colors.highlightBrownDark, "Dark brown background highlights" )
|
||||||
]
|
]
|
||||||
|> viewColors
|
|> viewColors
|
||||||
, Heading.h3 [] [ Html.text "Text Highlight Colors" ]
|
, Heading.h2 [] [ Html.text "Text Highlight Colors" ]
|
||||||
, Text.mediumBody [ Text.plaintext "Colors for highlighting text on a white background. These colors are readable at 14px bold and bigger." ]
|
, Text.mediumBody [ Text.plaintext "Colors for highlighting text on a white background. These colors are readable at 14px bold and bigger." ]
|
||||||
, [ ( "textHighlightYellow", Colors.textHighlightYellow, "Neutral text highlight #1" )
|
, [ ( "textHighlightYellow", Colors.textHighlightYellow, "Neutral text highlight #1" )
|
||||||
, ( "textHighlightCyan", Colors.textHighlightCyan, "Neutral text highlight #2" )
|
, ( "textHighlightCyan", Colors.textHighlightCyan, "Neutral text highlight #2" )
|
||||||
|
@ -43,13 +43,13 @@ example =
|
|||||||
|> List.map viewPreview
|
|> List.map viewPreview
|
||||||
, view =
|
, view =
|
||||||
\ellieLinkConfig _ ->
|
\ellieLinkConfig _ ->
|
||||||
[ Heading.h3 [] [ Html.text "baseFont" ]
|
[ Heading.h2 [] [ Html.text "baseFont" ]
|
||||||
, Html.p [ css [ Fonts.baseFont ] ]
|
, Html.p [ css [ Fonts.baseFont ] ]
|
||||||
[ Html.text "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz" ]
|
[ Html.text "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz" ]
|
||||||
, Heading.h3 [] [ Html.text "quizFont" ]
|
, Heading.h2 [] [ Html.text "quizFont" ]
|
||||||
, Html.p [ css [ Fonts.quizFont ] ]
|
, Html.p [ css [ Fonts.quizFont ] ]
|
||||||
[ Html.text "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz" ]
|
[ Html.text "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz" ]
|
||||||
, Heading.h3 [] [ Html.text "ugFont" ]
|
, Heading.h2 [] [ Html.text "ugFont" ]
|
||||||
, Html.p [ css [ Fonts.ugFont ] ]
|
, Html.p [ css [ Fonts.ugFont ] ]
|
||||||
[ Html.text "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz" ]
|
[ Html.text "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz" ]
|
||||||
]
|
]
|
||||||
|
@ -117,7 +117,7 @@ viewExample viewName view recoveryText extras =
|
|||||||
, Css.marginBottom (Css.px 20)
|
, Css.marginBottom (Css.px 20)
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
[ Heading.h3 [] [ Html.text viewName ]
|
[ Heading.h2 [] [ Html.text viewName ]
|
||||||
, Html.div [] extras
|
, Html.div [] extras
|
||||||
, Html.code []
|
, Html.code []
|
||||||
[ Html.text <|
|
[ Html.text <|
|
||||||
|
@ -137,9 +137,9 @@ example =
|
|||||||
, { firstName = "First5", lastName = "Last5", coins = 5 }
|
, { firstName = "First5", lastName = "Last5", coins = 5 }
|
||||||
]
|
]
|
||||||
in
|
in
|
||||||
[ Heading.h3 [] [ Html.text "With sortable headers" ]
|
[ Heading.h2 [] [ Html.text "With sortable headers" ]
|
||||||
, SortableTable.view config sortState data
|
, SortableTable.view config sortState data
|
||||||
, Heading.h3 [] [ Html.text "Loading" ]
|
, Heading.h2 [] [ Html.text "Loading" ]
|
||||||
, SortableTable.viewLoading config sortState
|
, SortableTable.viewLoading config sortState
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,7 @@ example =
|
|||||||
]
|
]
|
||||||
, view =
|
, view =
|
||||||
\ellieLinkConfig interactiveIsOn ->
|
\ellieLinkConfig interactiveIsOn ->
|
||||||
[ Heading.h3 [] [ Html.text "Interactive" ]
|
[ Heading.h2 [] [ Html.text "Interactive" ]
|
||||||
, Switch.view
|
, Switch.view
|
||||||
[ Switch.onSwitch Switch
|
[ Switch.onSwitch Switch
|
||||||
, Switch.id "switch-interactive"
|
, Switch.id "switch-interactive"
|
||||||
@ -58,14 +58,14 @@ example =
|
|||||||
)
|
)
|
||||||
]
|
]
|
||||||
interactiveIsOn
|
interactiveIsOn
|
||||||
, Heading.h3 [] [ Html.text "Disabled (On)" ]
|
, Heading.h2 [] [ Html.text "Disabled (On)" ]
|
||||||
, Switch.view
|
, Switch.view
|
||||||
[ Switch.disabled
|
[ Switch.disabled
|
||||||
, Switch.id "switch-disabled-on"
|
, Switch.id "switch-disabled-on"
|
||||||
, Switch.label (Html.text "Permanently on")
|
, Switch.label (Html.text "Permanently on")
|
||||||
]
|
]
|
||||||
True
|
True
|
||||||
, Heading.h3 [] [ Html.text "Disabled (Off)" ]
|
, Heading.h2 [] [ Html.text "Disabled (Off)" ]
|
||||||
, Switch.view
|
, Switch.view
|
||||||
[ Switch.disabled
|
[ Switch.disabled
|
||||||
, Switch.id "switch-disabled-off"
|
, Switch.id "switch-disabled-off"
|
||||||
|
@ -106,15 +106,15 @@ example =
|
|||||||
, { firstName = "First5", lastName = "Last5", submitted = 8 }
|
, { firstName = "First5", lastName = "Last5", submitted = 8 }
|
||||||
]
|
]
|
||||||
in
|
in
|
||||||
[ Heading.h3 [] [ Html.text "With header" ]
|
[ Heading.h2 [] [ Html.text "With header" ]
|
||||||
, Table.view columns data
|
, Table.view columns data
|
||||||
, Heading.h3 [] [ Html.text "Without header" ]
|
, Heading.h2 [] [ Html.text "Without header" ]
|
||||||
, Table.viewWithoutHeader columns data
|
, Table.viewWithoutHeader columns data
|
||||||
, Heading.h3 [] [ Html.text "With additional cell styles" ]
|
, Heading.h2 [] [ Html.text "With additional cell styles" ]
|
||||||
, Table.view columns data
|
, Table.view columns data
|
||||||
, Heading.h3 [] [ Html.text "Loading" ]
|
, Heading.h2 [] [ Html.text "Loading" ]
|
||||||
, Table.viewLoading columns
|
, Table.viewLoading columns
|
||||||
, Heading.h3 [] [ Html.text "Loading without header" ]
|
, Heading.h2 [] [ Html.text "Loading without header" ]
|
||||||
, Table.viewLoadingWithoutHeader columns
|
, Table.viewLoadingWithoutHeader columns
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -114,7 +114,7 @@ update msg model =
|
|||||||
|
|
||||||
view : EllieLink.Config -> State -> List (Html Msg)
|
view : EllieLink.Config -> State -> List (Html Msg)
|
||||||
view ellieLinkConfig model =
|
view ellieLinkConfig model =
|
||||||
[ Heading.h3 [] [ Html.text "Using the Tooltip module" ]
|
[ Heading.h2 [] [ Html.text "Using the Tooltip module" ]
|
||||||
, Text.mediumBody
|
, Text.mediumBody
|
||||||
[ Text.html
|
[ Text.html
|
||||||
[ Html.text "Label the Tooltip as either being the "
|
[ Html.text "Label the Tooltip as either being the "
|
||||||
|
Loading…
Reference in New Issue
Block a user