Commit graph

71 commits

Author SHA1 Message Date
Rafi
ca50e5750e
Fixing dom structure of Tags to follow (#13184)
* Using buttons instead of checkbox

* Adding svg icon

* Update app/javascript/onboarding/components/FollowTags.jsx

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Adding condition for crayons-btn-icon-left

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2021-05-03 17:20:26 +01:00
dependabot[bot]
62e150f5af
Bump eslint-config-preact from 1.1.3 to 1.1.4 (#13516)
* Bump eslint-config-preact from 1.1.3 to 1.1.4

Bumps [eslint-config-preact](https://github.com/preactjs/eslint-config-preact) from 1.1.3 to 1.1.4.
- [Release notes](https://github.com/preactjs/eslint-config-preact/releases)
- [Commits](https://github.com/preactjs/eslint-config-preact/compare/v1.1.3...v1.1.4)

Signed-off-by: dependabot[bot] <support@github.com>

* Add missing key prop for elements in iterators where necessary

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
2021-04-27 18:54:43 +02:00
Rafi
09c645f5a1
Adding aria labels in Suggested people to follow screen during onboarding (#12384)
Co-authored-by: Nick Taylor <nick@dev.to>
2021-03-17 11:59:50 -04:00
Jacob Herrington
e235036ecd
Fix typo (#12824) 2021-02-25 15:03:16 -06:00
Jacob Herrington
dd3121e91c
Add username to onboarding (#12697)
* Add username to onboarding

* Add margin to profile form error alert

* Update user controller for onboarding

Co-authored-by: Michael Kohl <me@citizen428.net>
2021-02-24 10:48:31 -06: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
76453b41fb
Updates ESLint rules to error on default imports (#12512)
* add rule

* add named imports

* more missed files

* so many files
2021-02-02 10:24:03 -05:00
Rafi
335957edd5
Adding focus trap to trap focus within the modal (#12366)
* Adding focus trap to focus trap in the modal

* Adding yarn lock

* Removing Fragment

* Fixing focus trap casing

* Adding waitFor
2021-01-28 10:18:21 +01:00
Rafi
931d9169fd
Fixing link focus (#12362)
* Fixing link focus

1. Removing display content from link
2. Removing extra margin at the top of link
3. Adding before link

* Extending crayon-fields and removing margin-top
2021-01-22 09:26:51 -05:00
Rafi
940c7ee37d
Adding aria labels and role to onboarding modal (#12363)
1. Adding role dialog
2. Adding aria-labelledby and aria-describedby
2021-01-21 13:58:55 -05:00
Nick Taylor
86eb75cee7
Report a Message in Connect (#12229)
* Frontend Ready for Connect Report Abuse

* add feedback api

* js defination fix

* Added Hooks to the Component

* add json response in feedback

* Block popup added

* fix render issue

* Made changes in internal view

* change error message

* Added few design changes =

* add test cases

* Update app/javascript/chat/actions/requestActions.js

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

* add PR suggestions

* add backend test cases

* report abuse form close

* Update app/javascript/chat/actions/requestActions.js

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

* Update app/javascript/chat/ReportAbuse/index.jsx

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

* add test cases

* Update app/javascript/chat/ReportAbuse/index.jsx

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

* Update app/javascript/chat/ReportAbuse/index.jsx

Co-authored-by: Marcy Sutton <holla@marcysutton.com>

* Update app/javascript/chat/ReportAbuse/index.jsx

Co-authored-by: Marcy Sutton <holla@marcysutton.com>

* group the fieldset

* fix report abuse api

* fix test case

* fix request test case

* fix typo

* cleaned up markup in report abuse component.

* Fixed spacing between abuse options.

* Fixed wording in report abuse confirmation.

* Removed unnecessary data-testid and aria-label attributes.

* Added some top margin to the report abuse form.

* Update app/javascript/chat/message.jsx

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Added a legend to the the fieldset.

* Update app/javascript/chat/actions/requestActions.js

Co-authored-by: Michael Kohl <citizen428@dev.to>

Co-authored-by: Sarthak <7lovesharma7@gmail.com>
Co-authored-by: Narender Singh <narender2031@gmail.com>
Co-authored-by: Marcy Sutton <holla@marcysutton.com>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Michael Kohl <citizen428@dev.to>
2021-01-19 12:07:47 -05:00
Michael Kohl
2e202b0399
Remove looking for work columns (#12173)
* Remove looking for work columns

* Fix schema.rb

* Undo accidental change

* Update spec
2021-01-11 11:22:39 +07:00
Ridhwana
7a9629172d
Profile generalization for the onboarding workflow (#11629)
* feat: v1 of the profile form

* feat: fix inputs and create a handleChange event

* feat: update the submit values to represent values from the form

* feat: ensure that errors and success is handled on send

* refactor: remove unused code

* feat: replace the old profile form with a new one

* fix: use the renames file

* refactor: safety net for groups

* chore: fix code climate issue

* tests: amend + add tests

* test: fix broken spec

* feat: update the setup for the test

* tests: refactored them to move the fake response into the before all

* feat: clunky way to quickly cater for color field since it was a quick and easy implementation

* feat: add a field.description to the color field

* refactor: pull some duplicate code into a new function

* chore: cater for a textarea field

* overflow issue

* refactor: use FormField instead of manual divs

* Update spec/requests/users_onboarding_spec.rb

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>

* Update spec/requests/users_onboarding_spec.rb

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>

* refactor: move out of method and into a constant

* refactor: user_onboarding_update to be more readable

* refactor: use current.save instead of declaring a new variable

* refactor: remove explicit check for bookean

* refactor: use request from '@utilities/http' instead :)

* refactor: no need for if with destructured groups

* refactor: move color field to its own component

* chore: remove colorfield now thats its a component

* fix: forgot about field

* feat: a text area component

* chore: remove textField function in favor of component

* refactor: checkbox refactor

* refactor: add a switch statement

* chore: move into a more organized folder

* fix: move the handler to props and off from field

* fix: add a conditional so we dont hit an error undefined method `success?' for nil:NilClass

* refactor: change from component to function

* feat: add a key attribute

* refactor: add role for readers

* refactor: remove unnecessary guard clauses

* refactor: use function instead of an arrow

* chore: document components

* test

* padding

* fixes

* test: fix the tests by using more general matchers

Co-authored-by: Paweł Ludwiczak <ludwiczakpawel@gmail.com>
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
2020-12-08 19:53:00 +02:00
Nick Taylor
d623157eee
Fixed some frontend tests causing unhandled rejection errors (#11627)
* Fixed unhandled rejection in <ImageUploader /> test.

* Fixed <FollowUsers /> tests.

* Fixed the tests for the <RequestManager /> component.

* Fixed unhandled rejection in search utilities.

* Added an unhandledRejection listener so tests will fail if a Promise fails.

* Added a comment about why you might get an unhandled rejection exception.
2020-11-26 06:11:25 -05:00
Nick Taylor
8fabccec4e
Add Preact dev tools to development bundles (#11459)
* Now Preact dev tools are injected into development bundles.

* Updated frontend debugging documentation.

* Updated frontend debugging documentation wording.
2020-11-18 14:20:58 +01:00
Michael Kohl
adb41a0a15
Uncheck email preferences by default (#10919)
* Uncheck email preferences by default

* Fix specs

* Update app/javascript/onboarding/components/__tests__/EmailPreferencesForm.test.jsx

Co-authored-by: Molly Struve <mollylbs@gmail.com>

Co-authored-by: Molly Struve <mollylbs@gmail.com>
2020-10-19 10:20:03 -04:00
Michael Kohl
fb27f52ed0
[deploy] Display banner if site hasn't been configured (PRE DEPLOYMENT TASKS) (#8435) 2020-07-07 07:37:04 -05:00
Nick Taylor
6542395b38
Upgraded to preact testing library 2.0.0 (#9103) 2020-07-06 14:53:10 -04:00
Mac Siri
50a7c2ffe0
Rename dir _tests to __tests__ & update .codeclimate.yml (#8982) 2020-06-29 15:18:39 -04:00
Nick Taylor
a7938ed287
Fixed a bunch of linting issues in components (#8921) 2020-06-26 10:26:02 -04:00
Nick Taylor
63b4d9fdc0
More frontend test cleanup (#8919) 2020-06-25 18:04:01 -04:00
Nick Taylor
09bb730f9d
Added a11y tests to frontend tests that were missing them (#8873) 2020-06-24 14:38:39 -04:00
Nick Taylor
568ada8fe6
Cleaned up some tests. (#8817) 2020-06-22 10:25:39 +02:00
Nick Taylor
653ec12300
Upgrade to Preact 10.4.4 (#8739)
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
2020-06-18 10:07:17 -04:00
Ben Halpern
1b37edeeb8
[deploy] Allow admins to define onboarding images in config (#8431)
* Add config for onboarding

* Fix tests/snapshot

* Improved specs
2020-06-12 08:48:20 -04:00
Ben Halpern
3c840610a1
[deploy] Remove unnecessary bulk from image assets (#8306)
* Remove unnecessary bulk from image assets

* Swap background-image

* Fix test

* Fix test
2020-06-05 17:51:06 -04:00
ludwiczakpawel
39295c0bea
Layout updates (#8107)
* flare tag line height

* .

* init

* widgets

* widgets lists

* new tabs on home

* instantclick

* .

* rethinking css

* .

* .

* empty space

* campaign widget

* .

* merge

* .

* update layout

* fix sidebars on home page

* .

* fix onboarding x

* spec

* test

* test

* better handling ads

* .

* spec

* card styling

* .

* i dont know what have i broken
2020-06-04 16:12:17 +02:00
Nick Taylor
a72831b952
Import jest-axe matchers via setupFilesAfterEnv config property (#8217)
* Now expect is extended for jest-axe via the jest setupFilesAfterEnv config property.

* Renamed a test setup file for jest.
2020-06-01 16:37:32 +02:00
Nick Taylor
530b13e8c7
made all frontend unit tests uniform by preffering it(...) over test(...) (#8113) 2020-05-28 17:18:15 +02:00
Vaidehi Joshi
3b9fe2658e
Fix pluralization in FollowUsers component (#7928) [deploy] 2020-05-18 11:38:47 -07:00
Ben Halpern
4eb2f05387
[deploy] Add generalized community name and description to onboarding slides (#7725)
* Comment out redirect

* Back to where we were

* Add basic generalization to onboarding

* Update app/javascript/onboarding/Onboarding.jsx

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>

* Update app/javascript/onboarding/components/IntroSlide.jsx

* Update app/javascript/onboarding/components/ProfileForm.jsx

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
2020-05-08 14:45:24 -04:00
ludwiczakpawel
2d9ff805ba
[deploy] Onboarding fix for mobile (#7732)
* fix

* snapshot
2020-05-07 20:05:40 -04:00
Mac Siri
8fcec7ead4
Unescape user's summary in followUser slide (#7675) 2020-05-06 12:14:05 -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
Mac Siri
f4000a1809
[deploy] Render onboarding on small screens correctly (#7548) 2020-04-27 16:16:33 -04:00
Vaidehi Joshi
e19eb60d1f
Add skip/continue functionality to onboarding navigation (#7488) [deploy]
* Dynamically render forward text in Navigation component

* Render either "Skip for now" or "Continue" on the FollowTags, ProfileForm, and FollowUsers components.
* Refactor the ProfileForm component to dynamically change the button text based on the form's state.

* Render specific button text for last onboarding slide

* Fix back arrow styles for accessibility

Also set an explicit width on the containing button around the svg.

* Use min-width to specify back-button size
2020-04-23 16:30:48 -07:00
Vaidehi Joshi
046ec2eaee
Use back button svg icon in onboarding slides (#7455) [deploy] 2020-04-22 16:54:46 -07:00
Vaidehi Joshi
5f67f7b2e3
Add a progress stepper to onboarding flow (#7450) [deploy] 2020-04-22 13:59:43 -07:00
Mac Siri
a181a3af3a
[deploy] Remove Onboarding's ClosingSlide (#7443) 2020-04-22 14:08:10 -04:00
Vaidehi Joshi
844c20b560
Reorder onboarding slides (#7429)
Swap FollowTags with ProfileForm
2020-04-22 11:51:34 -04:00
Vaidehi Joshi
bbe0bf970f
Split up content of EmailListTermsConditionsForm within onboarding (#7294) [deploy]
* Move Terms & Conditions, CoC into Intro slide of onboarding

Closes https://github.com/thepracticaldev/dev.to/issues/6545.

* Rename ClosingSlide in Onboarding tests

* Rename EmailListTermsConditionsForm to EmailPreferencesForm

* Proper lint and prepend `v2:` to some onboarding components

* Move email preferences to last slide

Closes https://github.com/thepracticaldev/dev.to/issues/6550.

* Use crayons variables for padding

* Remove backToSlide function, rename buttonIsDisabled function
2020-04-15 15:16:53 -07:00
Mac Siri
211ddb9613
[deploy] Add footer toggle to Onboarding's tag follow slide (#7293)
* Apply toggle logic to FollowTag

* Switch terminology and fix pluralization
2020-04-15 18:20:37 +02:00
Mac Siri
f4c9df2d8e
[deploy] Add footer toggle to Onboarding's user-follow slide (#7266) 2020-04-14 18:25:03 -04:00
Ben Halpern
e1dd1fe9e4
[deploy] Fix onboarding profile slide for short screens (#7269) 2020-04-14 15:30:26 -04:00
Mac Siri
39aca8993c
Combine profile onboarding slide (#7163) [deploy] 2020-04-09 13:47:42 -04:00
Vaidehi Joshi
dbbeaf2422
Onboarding intro slide tweaks (#7162) [deploy]
* Render the user's name on intro slide of onboarding

* Refactor terms + conditions form in onboarding view

* Style the back button using crayons design system.
* Remove redundant scroll styles (only need `overflow-y: scroll` here).
* Ensure that content is readable, and back button doesn't conflict with content.
* Ensure size of content is same size as "intro slide".
* Remove unnecesary inline styles, use CSS class instead.

* Fix missing userData issue

* Onboarding test cleanup, inline greeting instead of in a variable
2020-04-09 08:57:50 -07:00
Vaidehi Joshi
f63e254b20
Remove variants from frontend portion of onboarding (#7116) [deploy]
Since we're no longer using variants in onboarding, we don't need this code anymore!
2020-04-06 15:31:28 -07:00
Ben Halpern
6d6a36f3dd
[deploy] Fix small onboarding issues (#6963)
* Fix small onboarding issues

* Fix whitespace
2020-03-30 20:43:33 -04:00
Lisa Sy
b6fd02b70f
Improve onboarding UI and UX (P1) (#6901)
* Improve onboarding UI and UX (P1)

- Introduce Crayons variables
- Remove unnecessary CSS files to have just one CSS file

* Add new onboarding tests

* Update onboarding yarn test to reflect updated class names
2020-03-30 15:38:15 -07:00
Michael Kohl
244ab297c8
Move user following suggestions to internal API (#6601) [deploy] 2020-03-13 13:37:24 +01:00