Commit graph

1064 commits

Author SHA1 Message Date
dependabot[bot]
8bf2b56e42
Bump eslint from 7.32.0 to 8.6.0 (#15926) 2022-01-05 13:47:40 -05:00
Suzanne Aitchison
528bd2baa6
Tag autocomplete: storybook multi-select autocomplete component (#15796)
* core functionality in place

* fix dark theme background issues

* separate list for aria-live, add delete and blur functionality

* fix issue with input resize on edit

* handle input blur, prevent special characters, tweak keyup to keydown to ensure runs before change event

* group buttons and add default styles

* style tweaks

* fix logic error with insert index

* refactors

* clear suggestions on blur, even if no input value

* tweaks
2022-01-05 15:01:07 +00:00
zeotuan
59eea24244
add missing unique key to fragment created with map (#14395)
* add missing unique key to fragment created with map

* add appropriate key for fragment

* Remove files removed from main

* After merge cleanup

Co-authored-by: Michael Kohl <me@citizen428.net>
2022-01-05 11:07:33 +00:00
Suzanne Aitchison
228834596a
Add Storybook entry for tag suggestion item (#15811)
* Add UI template for tag suggestion

handle long tag names on small screens

* update hover background
2022-01-05 07:51:44 +00:00
dependabot[bot]
c2659d38df
Bump eslint-config-preact from 1.2.0 to 1.3.0 (#15834)
* Bump eslint-config-preact from 1.2.0 to 1.3.0

Bumps [eslint-config-preact](https://github.com/preactjs/eslint-config-preact) from 1.2.0 to 1.3.0.
- [Release notes](https://github.com/preactjs/eslint-config-preact/releases)
- [Commits](https://github.com/preactjs/eslint-config-preact/compare/1.2.0...v1.3.0)

---
updated-dependencies:
- dependency-name: eslint-config-preact
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

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

* apply new lint fixes after version bump

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2021-12-21 14:42:20 +00:00
yheuhtozr
5253717797
fix character limits i18n (#15830) 2021-12-21 07:15:21 -05:00
ludwiczakpawel
9b7503fde3
Update left sidebar links with new Crayons components (#15757)
* update

* hamburger fix

* Update app/views/shared/_hamburger.html.erb

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

* updates

* spec

* social media icons

* reading list counter

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2021-12-20 08:46:30 +01:00
Nick Taylor
6df9309284
Added the logo upload to the admin -> customization -> config -> images section. (#15729)
Co-authored-by: Michael Kohl <citizen428@forem.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Mac Siri <mac@forem.com>
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
2021-12-15 14:10:27 -05:00
Suzanne Aitchison
0295dbeabf
Update a11y of ButtonGroup component (#15765) 2021-12-15 12:52:33 +00:00
Suzanne Aitchison
c6868795cd
add cypress-pipe, fix flaky test (#15756) 2021-12-14 09:46:00 -06:00
ludwiczakpawel
878c27f9b0
Crayons: buttons followup (#15720)
* init

* whoops

* components update

* components update

* classes

* variables

* focus

* test

* spec

* test

* adjust colors and variables

* buttons colors

* Update app/javascript/crayons/CTAs/CTA.jsx

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

* proptype

* remove duplicated tests now in Cypress, enhance Cypress nav menu tests

* premove unneeded viewport in test

* remove focus check for now

* classnames

* Update app/javascript/crayons/CTAs/__stories__/CTAs.mdx

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

* Update app/javascript/crayons/CTAs/__stories__/CTAs.mdx

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

* better contrast

* classname

* add secondary button

* variants + docs

* docs updates

* radius-full

* variants oneof

* the?

* default values + extra stories

* Apply suggestions from code review

Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
2021-12-14 14:43:41 +01:00
Ridhwana
e250b46ed2
Using a Form Object that will persist for the Creator Settings Form (#15684)
* WIP: add a creatore settings form

* WIP: updat the controller to use the Creator Settings FOREM

* feat: use the creator settings form for the new action

* feat: add some default values for the new action

* a note about form data

* update the initiaize function to set some default values

* feat: update the form to use the model data

* feat: permit adn use the attributes within creator_settings_form

* update the flash error

* refactor: require and permit parameters

* chore: use booleans, set defaults and validate the form

* spec: update all the creator_settings tests

* chore: remove comment

* refactor: use self

* feat: aggregate failures'

* chore: remove the logo uploader in the controller

* refactor: update error handling

* feat: update the wasy the controller handles success and error

* chore: remove the resource errors

* feat: show flash message on new line

* fix: use a redirect so that we can get back to /new

* refactor: pass these values through as they seem to be caching whne setting them as default

* chore: change default values

* spec: update tests

* Fix CreatorSettingsForm specs

* fix: use a boolean for public

* spec: add another test for the success var

* fix: radio button labels to correspond + cyress specs

* spec: update based on new changes

* spec: update the params and the expected output

* spec: update the comments and status

* feat: no need for the initialize as we use Active Record Attributes

* feat: update the tac and coc to be persisted when ticked

* fix: amend spec

* blank space

* Message

Co-authored-by: Michael Kohl <me@citizen428.net>
2021-12-10 17:07:40 +02:00
ludwiczakpawel
11cabac518
Updating header with new Crayons buttons (#15653)
* init

* whoops

* components update

* components update

* classes

* variables

* focus

* test

* spec

* test

* adjust colors and variables

* buttons colors

* Update app/javascript/crayons/CTAs/CTA.jsx

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

* proptype

* remove duplicated tests now in Cypress, enhance Cypress nav menu tests

* premove unneeded viewport in test

* remove focus check for now

* classnames

* Update app/javascript/crayons/CTAs/__stories__/CTAs.mdx

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

* Update app/javascript/crayons/CTAs/__stories__/CTAs.mdx

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

* better contrast

* classname

* radius-full

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
2021-12-09 16:41:18 +01:00
Nick Taylor
e8184319b2
Extracted the logo uploader into its own partial (#15705)
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2021-12-09 09:52:24 -05:00
Josh Soref
0403e78f08
Spelling (#15702)
* spelling: access

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: additional

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: administrative

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: aggregate

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: assigns

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: attributes

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: autocomplete

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: because

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: between

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: bootstrap

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: calculating

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: captcha

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: character

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: chosen

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: commenter

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: competitor

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: componentize

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: contrast

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: corresponding

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: description

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: destroyed

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: destroys

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: discussion

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: episode

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: escaped

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: evaluates

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: expired

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: explicitly

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: facebook

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: fragment

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: functionality

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: improper

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: incentive

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: interfere

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: latest

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: message

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: minimum

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: moderator

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: mouseover

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: mutual

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: nonexistent

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: notification

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: occasionally

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: occurrence

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: occurs

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: octokit

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: offset

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: omitted

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: opacity

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: organization

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: organizations

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: overridden

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: override

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: overriding

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: prefill

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: previous

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: profile

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: recycling

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: registered

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: repositories

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: rescuing

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: response

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: returns

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: second

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: separator

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: services

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: subscriber

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: subscription

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: success

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: successful

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: successfully

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: suppress

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: test

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: thought

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: uniqueness

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: unknown

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: unproductive

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: unreachable

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: unsuccessful

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: utilities

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: utility

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: valid

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: voluntarily

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: vomited

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: website

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: withholding

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
2021-12-07 06:59:10 -07:00
Julianna Tetreault
00324c38e6
Pulls Creator Onboarding Redirect Links Into a Creator Onboarding-Specific Function (#15654)
* Pulls Creator Onboarding redirect links out into own function

* Adds all pathnames to redirectableCreatorOnbboardingLocation()

* Uses Array.proptypes.includes() in onboardingRedirectCheck.jsx

* Adds back removed pathname from redirectableLocation

* Refactor redirectableCreatorOnboardingLocation()

* Adds back code changes that were reverted at some point :/
2021-12-07 06:47:42 -07:00
Nick Taylor
8c1b1f1982
Creator Settings: Fixed the resizing of the preview logo (#15688) 2021-12-07 07:04:07 -05:00
Josh Soref
5324eb1477
Spelling fixes to live code (#15670)
Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
2021-12-06 12:11:25 +02:00
Fernando Valverde
6b5d511ea0
Update Android PN integration fixes (#15541)
* Add missing android payload attributes

* Fix click_action in Android PN payload

* Native bridge fixes to interact with PN + Podcast + Video features
2021-12-02 13:56:28 -06:00
ludwiczakpawel
03f97d4625
pullToRefresh adjustments - fixing scrolling hijacking (#15644)
* increase scorllable area

* fix

* fix

* ..

* adjustments

* revert previous wannabe fixes

* revert previous wannabe fixes

* revert previous wannabe fixes
2021-12-02 17:00:02 +01:00
Julianna Tetreault
59765b7ba6
Ensure COC and TOS Links Open on the Creator Settings Form (#15634)
* Opens COC and TOS links in new window, w/o redirects

* Removes superfluous > from the Creator Settings _form
2021-12-02 08:10:08 -07:00
Suzanne Aitchison
6a7b9361db
announce image upload success via aria live (#15650) 2021-12-02 12:46:33 +00:00
Nick Taylor
07d04f2d66
Fixed lint:frontend npm script (#15631)
* Set no-var eslint rule to error.

* Fixed npm script lint:frontend

* Replaced vars with lets as per new no-var erroring out rule.

* Fixed lint errors that surfaced after fixing the lint:frontend npm script.
2021-12-02 07:42:30 +00:00
Ridhwana
25dd42704e
Validate the color contrast ratio before submitting the Creator Settings Form (#15444)
* feat: add a color contrast utility

* feat: add an error when the color contrast is low

* feat: add form validations

* refactor: treat WCAGColorContrast as a library that can be intercanged at any time

* fix: styling

* test: add a test for the contrast

* feat: add test for WCAGColorContrast

* feat: update cypress tests for brand color and color contrast ratios

* feat: update the message to read better

* chore: update the styling

* refactor: address all feedback/suggestions

* Update cypress/integration/creatorOnboardingFlows/creatorSettings.spec.js

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

* Replaced other .trigger('change')s with .blur()

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
Co-authored-by: Nick Taylor <nick@dev.to>
2021-12-01 18:49:11 +02:00
Nick Taylor
6b21fe2bac
Fixed test that breaks once upgraded to Node 16. (#15621) 2021-12-01 09:24:03 -06:00
ludwiczakpawel
eaf0827286
Increase scrollable area on toolbar (#15615)
* increase scorllable area

* fix

* fix

* ..
2021-12-01 13:59:03 +01:00
Suzanne Aitchison
029d572cb3
markdown toolbar: refactor formatting insert to allow for undo queue (#15543)
* Refactor formatting insert to allow for undo queue

* use delete command to ensure correct behaviour when replacing with empty string
2021-12-01 09:18:43 +00:00
ludwiczakpawel
245e70d4a8
Crayons: Buttons vs CTAs (#15311)
* init

* buttons

* buttons, ctas, icons

* ctas fix

* links vs ctas

* alias

* fixes

* add tests for Buttons component

* add tooltip to button story controls

* add link and CTA tests

* add prop types

* docs

* designs

* docs

* focus visible moved to global place

* Updated some component snapshot tests.

* Mocked react-inlinesvg module because of https://github.com/gilbarbara/react-inlinesvg/issues/145\#issuecomment-623453339

* tests

* Copy updates

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

* missed spots

* Apply suggestions from code review

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

* danger accent colors

* node

* colors

* adding code comment

* better prop name: style -> variant

* button new

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Nick Taylor <nick@dev.to>
2021-11-30 20:40:32 +01:00
Suzanne Aitchison
cbd8179e99
open editor guide in new tab (#15534) 2021-11-30 08:39:09 -05:00
Suzanne Aitchison
c9b097e574
maintain cursor position while inserting an image (#15508)
* maintain cursor position while inserting an image

* undo small unintended change
2021-11-30 08:56:36 +00:00
VISHAL DEEPAK
def5de6d28
Remove extra script tag from embedded gists to prevent them from mixing up (#14674) 2021-11-29 15:48:20 -05:00
Suzanne Aitchison
315be22b70
prevent default on keyboard shortcut presses (#15509) 2021-11-29 08:54:00 -06:00
Suzanne Aitchison
d0dea2228c
Add markdown toolbar to V2 editor (#15347)
* initial add of toolbar to v2 editor WIP

* fix Form test knocked out by rebase

* basic image upload functionality added to toolbar

* add cypress tests for toolbar

* move image tests to previous cypress spec

* test markdown insertion from buttons in jest

* small tidy up

* remove right padding in scrollable layout, hide scrollbar

* update tests following new line changes

* add more doc comments

* tweak padding css

* create constant for image placeholder

* add image uploader change missed in staging after merge conflict resolution
2021-11-29 07:50:17 +00:00
Jeremy Friesen
58a4d805d7
Preventing author profile from going transparent (#15478)
* Preventing author profile from going transparent

Prior to this change, when you would hover over an author profile that
was "close to" the bottom of the page, the card would be transparent
instead of the expected opaque.

With this change, when you hover over an author profile that is "close"
to the bottom of the page, the card renders as an opaque card.

Now why does this work?  I don't really know, except to say that a
`display: table` imperative is a more "chunky" display element than a
block.  I would love for someone to explain why this works.

Tested against on MacOS Safari, Firefox, and Chrome.

https://developer.mozilla.org/en-US/docs/Web/CSS/display

Fixes #15290

* revert table

* fix

* missed spot

* actions dropdown

Co-authored-by: Paweł Ludwiczak <ludwiczakpawel@gmail.com>
2021-11-24 09:38:13 -05:00
Anna Buianova
d711897cb4
Accessibility improvements for hide comments modal (#15462) 2021-11-24 09:50:27 +03:00
Fernando Valverde
75a722bd6e
ForemMobile namespaced functions (#15212)
* window.ForemMobile namespaced functions

* Fix broken Buildkite

* Wait for data-loaded before using Runtime in pack

* Bring back sprockets base

* Better error handling

* Smal fixes to ConsumerApp to support Android platform

* Fix typo

* utilities/waitForDataLoaded.js

* Update app/javascript/utilities/waitForDataLoaded.js

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

* Review feedback

* Fix failing spec

* Cleanup promise

* Remove old utility file

* Add Cypress check for namespaced availability

* More specs

* Refactor to rely on ForemMobile for native bridge messaging

* Fix spec/requests/api/v0/instances_spec.rb

* Fix devices spec

* Remove changes to /api/instance

* Refactor to dynamic import

* Fix typo

* Fixed custom event detail payload for tests.

* mock ForemMobile function instead of webkit call directly

* failing jest test debug

* Another attempt

* Fixed broken test that was missing an onMainImageUrlChange prop on the component.

* Fixed mobile bridging E2E tests.

* Move Cypress tests to mobileFlows

* Add JSDocs + cypress spec for injectJSMessage when logged out

* Cleanup + Disable native image upload until AppStore approval

Co-authored-by: Nick Taylor <nick@forem.com>
Co-authored-by: Nick Taylor <nick@dev.to>
2021-11-23 15:25:29 -06:00
Nick Taylor
d13f0ba0cb
Added the babel-inline-react-svg plugin (#15461) 2021-11-23 12:24:50 -05:00
Ridhwana
8060f78893
Dynamically update the brand colors (#15432)
* Added alias for app/javascript/controllers

* Added hooks for Stimulus controller.

* Fixed eslint issue with @controllers alias.

* Initial working logo preview.

* Added explicit accept values for png and svg files only for a logo.

* Fixed content layout shift issue and resize to max height 80px.

* Cleaned up logo preview resizing.

* Added focus style to Upload logo label.

* Now the logo preview image has empty alt text as it's visual only.

* Fixed position of upload logo button.

* Removed tooltip for logo.

* Fixed check to load client-side controller.

* Put back tooltip, minus the aria-describedby

* Fixed E2E tests I broke.

* Made the logo preview visible to the accessibility tree.

* feat: update the brand colors on the page when we select a new one

* feat: update the radio button_tags to use crayons-radio

* feat: remove the fill attributes in the svg

* Added support for JPG image upload.

* Fixed height adjustment when width exceeds max preview width.

* feat: add form-background class with an accent

* feat: update the briightness accent on the page

* Fixed JS error if user cancelled file selection for a logo.

* Added the @routes webpack alias for routes.js.erb.

* Fixed data tooltip for assistive technologies.

* Fixed preview logo alignment with upload logo button.

* remove required as it's not doing anything

* feat: update the code brigtness code

* Opting to not show friendly error message if route fails to load.

* Fixed validation message not appearing for logo.

* Revert "Added the @routes webpack alias for routes.js.erb."

This reverts commit 3b6621dcde541f2fa05df6ff75af38955842b88e.

* Reverted to default styling of input[type="file"].

* Moved creator_settings_controller to admin/controllers.

* Updated E2E test for logo preview on the creator settings page.

* create tests for the brand color updates

* feat: update the description

* Update cypress/integration/creatorOnboardingFlows/creatorSettings.spec.js

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

* Update app/javascript/admin/controllers/creator_settings_controller.js

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

* feat: do not update branding if an invalid color is provided

* feat: move the brightness code to its own accent calculator file in js utilities

* test: brightness ratios

* chore: remove whitespace

Co-authored-by: Nick Taylor <nick@dev.to>
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2021-11-23 09:46:17 +02:00
ludwiczakpawel
50f8cb21fc
Mod tools trigger (#15400)
* init

* init

* test

* test
2021-11-22 08:22:26 +01:00
Suzanne Aitchison
460d2f433a
Markdown toolbar - update new line logic for block syntaxes (#15343)
* update new line logic for block syntaxes

* use padStart
2021-11-19 06:59:21 +00:00
Nick Taylor
ca0db28fc4
Add logo preview to creator settings form (#15363) 2021-11-18 12:23:24 -05:00
Michael Kohl
09828853f6
✂✂✂ Remove Connect (#14734)
* Remove Connect

* Remove more Connect specs

* Remove a lot more Connect code

* 🚮

* It all has to go

* Explicitly add httpclient

* Update application layout

* Remove messages association from User

* Start fixing specs

* reintroduce util function and refactor references

* Remove Connect Cypress test

* Fix more specs

* Remove Connect from listings

* Ignore contact_via_connect column on listings

* Remove contact_via_connect usages

* Ignore mod_chat_channel_id on tags

* Drop Connect tables

* Remove email_connect_messages from user notification settings

* Re-add httpclient 2.8.3

This was mistakenly removed as a merge conflict

* Don't need to exclude removed chat channel file

* Remove unneeded style for chat channels

* Remove unneeded channel list prop type

* Remove chat channels index/connect-link from getPageEntries

* Re-add comment from httpclient in Gemfile

* Remove connect references from mailers

Tag Moderators no longer have a chat channel

No longer will users be notified about new messages (there won't be
any)

No longer will users be notified about channel invites (you can't
invite anyone anymore)

* Don't configure Pusher and remove PUSHER_* from .env_sample

since it's removed from gemfile, the Pusher constant will not resolve, if this is
configured in the environment variables we'll fail to boot.

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Dan Uber <dan@forem.com>
2021-11-18 08:21:00 -06:00
Suzanne Aitchison
15fed1cce4
Revise skip link behaviour (#15401)
* Revise skip link route change behaviour

* remove cypress test for divergent behaviour no longer needed

* fix import path

* remove duplicate styles - woops

* use translated string
2021-11-18 13:45:08 +00:00
Anna Buianova
4cab190285
Hiding comments: an option to hide or keep children (#15178)
* Optional hiding child comments (start)

* Changed confirm button in comments hide form

* Hide children comments if hide_children was passed

* Added a spec for hidden child comment notifications

* Hide only explicitly hidden comments

* Hide comment modal on article page

* Prevent default behaviour for hide comment link

* Improved hide comments modal looks

* Improved hide comments modal looks

* Removed unused code

* Send hide comment form via fetch

* Hide comment descendants when hide_children was passed

* Don't hide hidden comments descendants on permalink

* Removed unnecesary span

* Improved hide comments modal styling

* Removed unused styles and js, improved styling

* Clickable label

Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com>

* Fixed showing hidden comments spoiler for article author

* Fixed hideArticleComments.spec.js

* Fixed displaying hidden comments text for artice author, added specs

* Target hide comments modal inside the modal when adding a listener

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

* Replaced hide comment link with a button

* Refactored adding hide_children url param

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

* Fixed cypress hide comments test

* Removed aria-label for submit on the hide comments modal

* Fixed formatting

Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2021-11-18 11:57:40 +03:00
Nick Taylor
52ec967de5
Fixed issue where element didn't exist in the config Stimulus controller. (#15408) 2021-11-17 15:25:17 -05:00
Suzanne Aitchison
41e0ac9e63
Fix timestamp typo (#15369) 2021-11-15 17:04:04 +00:00
Jeferson S. Brito
a0e15f7bd6
Add Snackbar component on reading list (#15235) 2021-11-15 13:06:21 +02:00
ludwiczakpawel
09db50b296
Update tag's style (#15266)
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Michael Kohl <citizen428@forem.com>
2021-11-11 14:03:31 -05:00
Suzanne Aitchison
1dda5b4058
fix some prop type errors on the home page (#15314) 2021-11-10 13:47:55 +00:00
Suzanne Aitchison
832d0d3a4d
Markdown toolbar: add 'undo' functionality (#15239)
* WIP - main formatters with undo syntax

* tests for new text area utils

* WIP: formatters undoing and formatting, tests to follow

* small tweak

* WIP - tweaks to heading

* add heading level tests

* refactor link formatting into separate functions, flesh out tests

* add missing test case, adjust link undo
2021-11-10 12:06:25 +00:00