Commit graph

21 commits

Author SHA1 Message Date
ludwiczakpawel
086a53ba93
Storybook updates (#15848)
* updates

* updating doc

* Fixed broken documentation in Storybook stories.

* bring back a element

* md --> mdx

* c-* doc update

Co-authored-by: Nick Taylor <nick@dev.to>
2022-01-14 11:06:23 +01:00
Papu Kumar(ReX)
6da90073f6
Fix Prop Types Error #14837 (#14889)
* Fix Prop Types Error #14837

Fixed prop types errors for Button, ButtonGroup, Modal and articlePage

* #added some checks into default children props

Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2021-10-05 10:58:48 +02:00
Suzanne Aitchison
dcecc8bf00
Log prop-types warnings to console in development (#14635)
* enable debug for warnings in dev env

* remove preact/devtools call no longer needed

* fix majority of proptype errors on home page

* sweep up proptype errors from listings page

* fix article form error
2021-09-01 09:27:58 +01:00
Suzanne Aitchison
bfb4f00aae
Add copy to HTML feature for storybook (#14599)
* Add copy to HTML feature for storybook, inc fix for article markup

* remove html stories no longer needed
2021-08-27 16:09:21 +01:00
Nick Taylor
e0ee5e71f4
Some eslint fixes. (#14605) 2021-08-27 08:37:09 +01:00
Suzanne Aitchison
4aebfb62f2
Improve keyboard accessibility of comment rate limit and error modals (#13536)
* add modal code to Forem namespace, use showModal in the rate limit modal generator

* add cypress tests for both modals

* styling tweaks

* tidy up

* make sure modal trap selector is unique to page, update Modal JSDoc

* add additional jest test for focusTrapSelector
2021-05-03 07:14:23 +01:00
Suzanne Aitchison
5bed8f56d4
improve keyboard accessibility of modals 12427 10610 (#12511)
* adds focusTrap wrapper to preact Modal component

* add view specific code for focus trap in admin add nav link

* add script to return a focustrap toggle, use in add nav link modal partial

* add trap to edit nav link modal

* add handlers for sign up modal

* update modal controller for admin section, update nav link modals to use

* update other admin modals with new data values for trap

* remove unneeded erb script file

* remove unneeded target

* refactor to remove extra unneeded param

* remove duplicate code, store getFocusTrapToggle in window

* trap focus in comment and bookmark showModal instances for not logged in user

* remove need for activator id

* clean up id refs no longer needed

* remove custom code and re-use focsu-trap lib

* update storybook docs

* update default export in focusTrap

* prevent close button click triggering a modal toggle twice

* ensure if user navigates from a modal the trap is deactivated

* add jsdoc comments and add dynamic import

* ensure admin controller modal traps are cleaned up on disconnect

* update sign up modal to use crayons

* update modal controller and admin nav links modals to use preact modal

* update profile fields modals for new controller

* tweak styling of sign up and admin modals to match previous

* update listings modal to use crayons modal, adapt focus trap to work with click outside

* memoize deactivate callback to ensure modal can be presented on first page load

* add missed focustrap changes

* fix focus trap issues in onboarding flow

* refactor onboarding focus trap, remove getFocusTrapToggle

* tweaks for styling and article modal toggle

* add click outside tests to modal

* add cypress tests for the login modal

* update liquid tag tests affected by change

* refactors to address review comments

* fix issue with login modal presented twice on comment add

* change ids to selectors in admin modals

* small pr comment refactors

* add listings e2e tests

* add nav link modal tests

* fix issue with help modal

* tweak to fix ui bug from merge

* remove context from showLoginModal

* rename toggleModal

* rename state property for clarity

Co-authored-by: Nick Taylor <nick@dev.to>
2021-02-24 16:01:10 +00:00
Katie Davis
9d4b6c36ea
updates article form to have warning modal (#12430) 2021-01-28 11:32:28 -05:00
ludwiczakpawel
bf72758c4e
Close modal on escape keypress (#12428)
* tooltips 1.0.1

* tooltips 1.0.1

* close on esc

* simpler
2021-01-26 15:12:54 +01:00
Lisa Sy
ea00c808bd
Storybook: Add DocsPage and test out static content (#11397)
* Update naming of guidelines section and improve Introduction page

* Add Docs

* Add docs

* Install Docs add-on

- Rename top-level folders and sort manually
- Add MDX static pages

* Updated all Storybook addons to 6.1.3 except for notes as it's currently 5.3.21

* Fixed naming of section for the select component.

* Updated yarn.lock file.

* Added missing dependency @storybook/addon-docs

Co-authored-by: Nick Taylor <nick@dev.to>
2020-12-02 09:56:38 -08:00
Mac Siri
5ef6106045
Update JS dependencies with yarn upgrade (#11589) 2020-11-24 11:17:25 -05:00
Emma Goto
977e8aec45
Bump storybook to version 6 (#9766)
* Bump storybook to version 6

* Remove storybook addon-docs and revert back to storybook/addon-notes

Co-authored-by: Nick Taylor <nick@dev.to>
2020-08-17 10:34:43 +02:00
Nick Taylor
3402856fdc
Make <Modal /> component more accessible (#9563)
* Used <dialog /> for modal to stay on the semantic HTML train.

* Added tests and fixed a11y issues with <Modal /> component.
2020-07-29 10:35:42 -04:00
Nick Taylor
2130269f91
Documentation Improvements to Storybook (#8947) 2020-06-29 08:25:57 -05:00
Nick Taylor
a7938ed287
Fixed a bunch of linting issues in components (#8921) 2020-06-26 10:26:02 -04:00
ludwiczakpawel
a161d3ce31
[deploy] Redesign article editor (#7524) 2020-05-29 11:59:37 -04:00
Nick Taylor
c83cad6fb6
Sorting Storybook stories (#8058)
* Added story sorting to Storybook.

* Added design system guidelines.

* Made Base in Storybook tree 2nd in the tree view.

* Now Components are 3rd in the treeview of Storybook.

* Now App Components are 4th in the treeview of Storybook.

* Froze node version to 12.16.0

* Revert "Froze node version to 12.16.0"

This reverts commit 093b119c7d7ca05ecb4e1c0234b24bcf8e7b10a4.
2020-05-27 13:10:16 -04:00
Nick Taylor
be5f80a04b
Moved common-prop-types out of src/ folder (#7871) 2020-05-14 16:58:29 -04:00
ludwiczakpawel
9ddac632e4
Modals (#7603)
* wip

* no comment

* tests

* typo

* typo

* crayons example page

* doc

* boxes fix

* fix

* Update index.html.erb

* Small refactor to return null when the modal is not visible.

* Update app/assets/stylesheets/components/modals.scss

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>

* tiny fixes & improvements

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
2020-05-05 15:33:17 +02:00
Nick Taylor
ddf6a06bc2
Fixed a typo in a a folder name. (#7671) 2020-05-04 13:53:43 -04:00
Nick Taylor
e4fdbd1a30
Restructure Storybook stories in sidebar (#6915)
* Renamed designSystem to crayons.

* Restructured how Storybook stories are laid out in Storybook's sidebar.

* wip

* More folder restructuring for Storybook sidebar.

* Fixed Dropdown description story.

* There no longer is a Dropdown for no padding. Just add additional utility classes.

* Showing dropdowns by default in Storybook as they are hidden by default.
2020-03-30 17:26:04 +02:00