Commit graph

1079 commits

Author SHA1 Message Date
ludwiczakpawel
87ff8f16a1
Color tokens (#16107) 2022-01-21 07:41:03 +01:00
Jeremy Friesen
af2e1f0545
Expanding the range of followed tags we show (#16213)
The fix might be a bit of a work-around for a more general approach, but
we're fighting against the magic of the points vs. explicit_points
tension as defined in the [Follows::UpdatePointsWorker][1].

That is to say, it's possible (and happens) where I have assigned an
`explicit_points` of 1 for a tag, but the calculated `points` are less
than 1.  The calculated `points` are what we send forward in the
[AsyncInfoController][1] (by way of the
[UserDecorator#cached_followed_tags][3] method).

In DEV, I ran the following queries:

**User assigned points `>= 1` but calculated `< 1`**

985,352 records

```sql
SELECT count(id)
FROM follows
WHERE followable_type = 'ActsAsTaggableOn::Tag'
  AND points < 1
  AND explicit_points >= 1;
```

**User assigned points `>= 1` but calculated `>= 1`**

5,366,478 records

```sql
SELECT count(id)
FROM follows
WHERE followable_type = 'ActsAsTaggableOn::Tag'
  AND points >= 1
  AND explicit_points >= 1;
```

**User assigned points `>= 1` but calculated `>= 0`**

0 records.

```sql
SELECT count(id)
FROM follows
WHERE followable_type = 'ActsAsTaggableOn::Tag'
  AND points <= 0
  AND explicit_points >= 1;
```

**User assigned points `<= 0` but calculated `> 0`**

1,146 records

```sql
SELECT count(id)
FROM follows
WHERE followable_type = 'ActsAsTaggableOn::Tag'
  AND points > 0
  AND explicit_points <= 0;
```

Synthesizing that, almost 1 million tag follows of the total 6.3 million
are not showing up in the user's left navigation.  And 5.3 million are
roughly correct.

In adjusting the logic, we're now going to have more tags showing up in
the left.  And just over 1,000 might now show up that would be unexpected.

Closes #14937.

[1]:c63e0b629e/app/workers/follows/update_points_worker.rb
[2]:c63e0b629e/app/controllers/async_info_controller.rb (L40-L65)
[3]:c63e0b629e/app/decorators/user_decorator.rb (L23-L34)
2022-01-20 19:46:42 -05:00
Julianna Tetreault
615137a883
Remove the "Getting Started" Section from the Config (#16033)
* Removes the Getting Started section and related code from the config

* Removes the admin_manages_configuration_spec.rb

* Removes "Required" tags from Config

* Reverts removal of activateMissingKeysModal

* Removes mandatory.rb
2022-01-20 07:31:35 -07:00
ludwiczakpawel
43c188eafb
Updated indicators (#16190) 2022-01-20 06:25:10 +01:00
Ridhwana
a8fa1c916a
Creator Onboarding Logo Updates for launch [Will be merged and Deployed 17 January] (#16103)
* feat: hide the logo_svg behaind a featur flag if we've ennabled it

* feat: show the input field iis the feature flag is enabled

* feat: show the new logo when the feature fkag is enabled

* chore: change working

* feat: add a logo spec

* fix: with the updated changes we show a community name if there is no logo, hence we sometimes would need to update the community name instead of the logo on preview

* fix: use innerText

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

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

* empty commiit

* empty commiit

Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
2022-01-17 16:46:06 +02:00
Andy Zhao
bdeae6b356
Update storybook node version (#16106) 2022-01-14 08:00:39 -05:00
ludwiczakpawel
7c07913aa6
Storybook improvements (#15860)
* storybook backgrounds

* variables for background

* converting colors scss to css

* prepare for theming

* themes

* Update app/javascript/.storybook/preview.js

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

* restart

* restart

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2022-01-14 11:06:42 +01:00
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
ludwiczakpawel
ea28093bbb
Implementing new buttons (#15843)
* buttons

* view archive link block

* revert font weight change

* save draft title

* revert

* fix

* specs

* specs

* spec

* spec

* for fcks  sake

* Change spec for unarchive/archive button from .find to .findByRole

* fix help icon

* improve a11y on close.jsx

* bring back the focus

* .

* Update cypress/integration/seededFlows/publishingFlows/uploadImage.spec.js

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

* drop icons.jsx

Co-authored-by: Nick Taylor <nick@dev.to>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2022-01-14 10:28:31 +01:00
Nick Taylor
ca646f65a9
Now HTML validation works for the adjust tags section of the moderation tools panel (#16062) 2022-01-13 07:11:44 -05:00
Nick Taylor
ed003d3ab4
Refactored client-side onboarding redirect logic. (#16026) 2022-01-11 07:04:06 -05:00
Daniel Uber
4180287e70
Migrate faker dependency to supported upstream (#16037)
* Move faker package to supported(?) upstream

* Import from new package
2022-01-10 15:00:48 -06:00
Jeremy Friesen
f45e784e7f
Favor using existing variable over re-parsing (#15995)
While working on #15916 (via #15983 and later #15994) I was exploring if
we needed to stringify JSON values.  I also injected a few `try, catch,
debug` areas.

Consolidating the parsing does not appear to adversely affect things.
2022-01-10 12:33:31 -05:00
Julianna Tetreault
0dfad5b07f
Remove Setup Banner (VerifySetupCompleted) (#15969)
* Remove all references to VerifySetupCompleted to remove setup banner

* Removes setup banner-related specs

* Adjusts the title in activateMissingKeysModal

* Adds the show expand classes to getStartedBodyContainer in show.html.erb
2022-01-10 10:30:05 -07:00
Zoey Zheng
775bdb7810
Add individual forem name to flag user modal (#15505)
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2022-01-07 09:59:53 +07:00
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