Commit graph

1001 commits

Author SHA1 Message Date
ludwiczakpawel
1c03584acf
missing padding (#15168) 2021-10-22 22:35:05 +02:00
ludwiczakpawel
d1aac57053
Podcasts fixes (#15130) 2021-10-22 11:06:11 +02:00
Suzanne Aitchison
5069cd681a
Markdown editor toolbar (#14876)
* rough starting point, roving tabindex in toolbar, bold and italic buttons

* refactor, add link

* add ul

* add ordered list

* core formatters in place, wip

* overflow options

* add keyboard shortcuts

* tidy up some dodgy classes

* add mocks for runtime in test and storybook, use correct modifier key for tooltip

* style tweaks

* refactor tooltips

* add markdown formatters tests

* add tests for toolbar component, fix mistake in overflow menu tooltips

* undo change no longer needed to button

* fix issue accessing runtime in formatters file

* only show darkened buttons and tooltips when focus-visible is true

* mobile view

* fix for responsive buttons & roving tabindex

* tweaks from PR review

* update cursor position on link insertion

* add a new line after block selection formatting

* align icons in center

* tidy up overflow menu listeners

* small refactors

* test for new text area util

* tidy up new lines after syntaxes

* fix logic in cursor offsets for links

* prevent scroll jumps after inserting syntax

* some style tweaks

* insert level 2 heading with new lines above and below

* update icons

* use margin instead of gap
2021-10-19 09:22:54 +01:00
Suzanne Aitchison
7a9352ba86
make default alt text 'image description' (#15063) 2021-10-13 16:37:34 +01:00
Nick Taylor
924ea41fd0
Migrated Storybook to webpack 5. (#15050) 2021-10-12 14:49:10 -05:00
Julianna Tetreault
7e38db9afb
Resolve Errors Related to getUnopenedChannels.jsx (#14990) 2021-10-12 08:08:40 -04:00
Suzanne Aitchison
70683d6d86
prevent scroll jumps when using mention autocomplete (#15031) 2021-10-12 13:06:27 +01:00
Michael Kohl
6753bd90c1
Fix tag dropdown (#14867) 2021-10-12 11:58:29 +07:00
Papu Kumar(ReX)
33742e7907
Fix PropTypes Error Create New Post Page (#14969) 2021-10-11 09:48:24 -04:00
Pramod
ce4ba84184
fix: accessibility issue with feeds comment section (#14958)
* fix: accessibility issue with feeds comment section

* fix: comments section name for logged out scenario and search results

* fix: review changes for logged in scenario

* fix: updated comments section aria label
2021-10-07 17:01:42 +01:00
Daniel Uber
412fa09026
Rename jest test from spec.js to test.js, so it actually runs (#14972)
* Rename jest test from spec.js to test.js, so it actually runs

* rename snapshot from spec.js.snap to test.js.snap
2021-10-07 08:13:47 -05:00
rhymes
e5226b9951
Upgrade Stimulus to 3.0 (#14869)
* Upgrade Stimulus to 3.0

* Remove unused variable

* Bump postcss from 8.3.8 to 8.3.9 (#14956)

Bumps [postcss](https://github.com/postcss/postcss) from 8.3.8 to 8.3.9.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.3.8...8.3.9)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-05 20:00:37 +02:00
Nick Taylor
020829ab16
Fixed lint issue (#14954) 2021-10-05 12:07:20 -04: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
Arit Amana
9d1eaee84e
Heavy Confirmation Flow for DisplayAd-Destroy (#14862)
* wham, bam, done!

* refactor and remove switch statement

* add guards to handleRecord function

* make cypress spec more robust
2021-10-04 08:36:43 -04:00
Suzanne Aitchison
b0b2b995c5
dont show rules for top tags (#14878) 2021-10-01 16:16:00 -04:00
ludwiczakpawel
096cf18b10
Article layout (#14753)
* style updates

* author and tools

* overflow hidden for avatars because geeeez

* font smoothing

* reverting little change

* specs

* preview

* css fix

* avatar fix'

* No longer eager load user profile when showing articles.

articles show view no longer needs user profile, as it no longer
renders the user profile preview.

* tags

* tags

* tags reverts

* typo

* dropping initializer for user cards previews on article page

* spec

* remove spec

* revert

* Update app/decorators/article_decorator.rb

Co-authored-by: Michael Kohl <me@citizen428.net>

* Update spec/requests/stories_show_spec.rb

Co-authored-by: Michael Kohl <me@citizen428.net>

* yoloing outline change on buttons because i couldn't see any visual difference

Co-authored-by: Dan Uber <dan@forem.com>
Co-authored-by: Michael Kohl <me@citizen428.net>
2021-09-30 19:08:06 +02:00
Suzanne Aitchison
58e3d6efd5
Suggest top tags when tag search is empty (#14817)
* show top tags when search is empty

* add cypress tests

* nudge travis

* tweak to e2e test

* show a 'top tags' heading

* only suggest tags that are supported

* Add supported scope to Tag

Co-authored-by: Michael Kohl <citizen428@forem.com>
2021-09-30 09:41:20 +01:00
Michael Kohl
081f43b356
Don't include "anti-followed" tags in email digest (#14782)
* Separate followed and "anti-followed" tags

* Minor code change

* Indicate "anti-followed" tags in sidebar

* Fix UpdatePointsWorker spec

* Cries in Arel

* Use antifollow scope more selectively

* Add spec for not_cached_tagged_with_any scope

* Add explanatory comment

* Remove unused route

* Update comment

* Remove unrelated change, figure out why > 1 later

* Need more 

* Avoid false positives in spec

* Change handling of ingored tags in sidebar

* Add explanatory comment
2021-09-30 10:44:38 +07:00
Arit Amana
8cbbc222e9
Heavy Confirmation Flow for Broadcast-Destroy (#14819)
* hook up frontend parts

* complete backend, save success alert issues

* fix broken existing specs

* complete snackbar confirmation on page redirect

* rollback success alert; but leave foundation for it in place

* preserve a11y features of snackbar; complete cypress tests

* test redirect after braodcast destroy
2021-09-29 07:43:00 -04:00
Ben Halpern
036d75aa6e
Admin-configurable display locale (#14620)
* Admin-configurable display locale

* Add i18n-js and namespacing

* Basic tests and clean up

* A few test adjustments

* Update vendor cache

* Fix a few tests

* Fix a few tests

* Update app/views/articles/_actions.html.erb

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

* Update app/views/articles/_comments_actions.html.erb

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

* Update app/views/articles/_single_story.html.erb

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

* Update app/views/articles/_single_story.html.erb

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

* Update app/views/comments/_comment_header.html.erb

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

* Update app/views/layouts/_sidebar_tags.html.erb

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

* Update app/views/listings/index.html.erb

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

* Update spec/system/homepage/user_visits_homepage_articles_spec.rb

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

* Update spec/system/user/view_user_index_spec.rb

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

* Alphabetical locale page

* Add activerecord custom validation error translations

* Add i18n to webpacker

* Fix a few tests

* Adjust error messages

* Add i18n-tasks

* Adjust JS to get working with jest

* Adjust the way translations are pulled in

* Adjust jest tests

* Remove time localization

* Remove superfluous public js

* Add basic tests for i18n application controller

* Remove unnecessary content

Co-authored-by: Michael Kohl <citizen428@dev.to>
2021-09-28 11:04:35 -04:00
Angel Barros
bb8b32bdf2
Zappat0n/add rate limit model everywhere 11500 (#14609)
* Create showModalAfterError function

* Show modal when comments rate limit is reached

* Show modal when article reaction rate limit is reached

* Show modal when follow user rate limit is reached

* Show form error when listing creation rate limit is reached

* Show form error when feedback messages rate limit is reached

* Rename functions for listings rate limit checks

* Show modal when notifications reaction rate limit is reached

* Show modal when picture upload rate limit reached

* Show modal for reactable objects when rate limit reached

* Add and modify tests

* empty commit

* Match modal messages to tests

* Fix error updating Modals

Co-authored-by: Dan Uber <dan@forem.com>
2021-09-23 10:49:19 +01:00
Keshav Biswa
086813afd4
Accessible names for follow buttons (#14687)
* added aria-pressed value to all follow_buttons

* added check to remove aria pressed attribute and added cypress tests

* removed unfollow aria-label setting and cypress test fixes

* fixed cypress failing tests

* failing cypress test fix

* added steps to check correct states are loaded when page refreshed

* refreshed alias after page reload
2021-09-22 10:34:34 +07:00
Ridhwana
9d16aa0166
chcek if the element exists before calling onclick on it (#14785) 2021-09-21 18:34:49 +02:00
Suzanne Aitchison
b7d63a6e8d
workaround getComputedStyle issues in all jest tests (#14737) 2021-09-21 10:52:54 +01:00
Suzanne Aitchison
634ec98f11
fix error adding removing tags from article mod tools (#14769) 2021-09-21 10:52:37 +01:00
ludwiczakpawel
987c48771c
padding fix (#14766) 2021-09-20 17:45:18 +02:00
Michael Kohl
75d1025023
No longer allow Connect messaging for listings (#14741) 2021-09-20 06:20:13 -04:00
Andy Zhao
e1606bcb0c
Move pin post to admin ✂️ (#14739)
* Update pin post button to be an admin articles button instead

* Rename file since we don't pin posts on show page

* Don't use instant click for admin link

* Update tests to visit the article from the start
2021-09-17 14:25:39 -04:00
ludwiczakpawel
e7af2bfc86
Little frontend refactor (#14755)
* profile dropdown update
* dropdown fixes
* preview cards fix
2021-09-17 16:23:51 +02:00
Daniel Uber
57561b1815
Check required inputs for apple authentication (#14750)
All providers except apple use a common key/secret form partial, but
the apple authentication section uses client_id, key_id, pem, and
team_id.

Assuming all four of these are required, when the enabled provider
name is 'apple', check for those values. For other providers (github,
facebook, etc) only check secret and key as before.
2021-09-17 07:39:53 -05:00
ludwiczakpawel
0b547bf8cd
Tabs (#14738)
* sliding tabs

* Add aria-label to the navigation

This supports the cypress tests, as well as retaining existing accessibility features.

* Adapt feedNavigation cypress test to handle new navigation layout

Before looking for week, month, year, or infinity top feeds, select
"Top" and wait for the page refresh.

* increasing tappable area + making foucs outline visible

Co-authored-by: Dan Uber <dan@forem.com>
2021-09-16 21:42:55 +02:00
Ridhwana
69b4c6c5e3
Fix Forem Ownership Field (#14730)
* fix: mistakenly renamed forem_owner_secret to owner_secret

* chore: revert change from merge

* refactor: use the Forem Instance model

* extra .
2021-09-16 06:56:59 -04:00
Arit Amana
aa5f18b234
Admin Save Confirmation - Removing Badge Achievements (#14684)
* schema file undelete description

* update with main

* update with origin

* update

* create controller; hook up to badge_achievements

* almost done with implementation

* push up what I have

* complete implementation; generalize snackbar usage

* start writing tests

* add confirmation text entry step to test

* Fix delete via JS

* implement danger notice for errors

* complete cypress test

* create ErrorAlert CustomEvent and implement

* fix failing badge_achievements spec

* start applying PR review changes

* hook up Preact Modal

* fix cypress tests

* remove old comment

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

* consolidate messaging functions

Co-authored-by: Michael Kohl <citizen428@forem.com>
Co-authored-by: Nick Taylor <nick@forem.com>
2021-09-15 21:25:01 -04:00
dependabot[bot]
f0700b2588
Bump jest from 26.6.3 to 27.2.0 (#14722)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2021-09-14 11:20:15 -04:00
Michael Kohl
c946d0bf6b
Add feature flag for Connect (#14644)
* Add feature flag for connect

* Start using Connect feature flag

* Add feature flag check to plaintext mailers

* Minor fixes/formatting issues

* Fix typo

* Enable Connect feature flag for tests

* Fix feature flag in tests

* Update rails_helper

* Fix typo

* (╯°□°)╯︵ ┻━┻

* One more try

* connect announcement

* Use connect feature flag in admin and admin routes

* Add aria-live attribute to announcement

* Undo schema.rb changes

Co-authored-by: Paweł Ludwiczak <ludwiczakpawel@gmail.com>
2021-09-13 10:45:56 -04:00
ludwiczakpawel
f2f2c34673
3d drop shadows (#14701)
* remove 3d box shadow

* profile cards fixes

* little fix

* dark mode + listings modal

* dropdowns padding

* whoops
2021-09-13 11:02:53 +02:00
Suzanne Aitchison
ba7fa0ad11
add temporary ahoy stats for tag sidebar clicks (#14688) 2021-09-09 08:31:27 -05:00
Keshav Biswa
42c9a10f57
Accessible names for follow buttons (#14389)
* added follow hidden tags for accessibility

* fixed failing tests

* replaced hidden span with screen-reader-only with aria-label

* add aria-label dynamically to follow buttons

* fixed followButtons

* fixed cypress tests and updated addAriaLabelToButton helper

* Fixed failing tests

* fixed failing tests

* Update cypress/integration/seededFlows/notificationsFlows/followUserFromNotifications.spec.js

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

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2021-09-07 16:09:06 +01:00
Arit Amana
877cb5c322
Save Confirmation - Admin (Part 1 of 2) (#14418) 2021-09-02 11:49:05 -04:00
Fernando Valverde
49efd6e41d
Removes target=_blank and small banner redirect tweak (#14548) 2021-09-01 08:27:24 -06: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
3b67810b9d
Add support for JSX copy paste in Storybook (#14591)
* add support for JSX and HTML copy paste

* remove html addon, refactor dropdown story

* undo html addon settings
2021-08-30 09:36:01 +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
Nikhil Taneja
ff008e4702
#12643 Add eslint rule for formatting redundant curly braces in jsx (#14592) 2021-08-26 11:15:06 -04:00
Suzanne Aitchison
e40a49e7f1
Fix error adding and removing tags as mod (#14566)
* fix error adding and removing tags

* fix login modal test

* remove unneeded property

* fix followtag spec
2021-08-24 13:44:21 +01:00
Ridhwana
5827be4ecc
RFC 190: Forem Creator Signup Page (#13875)
* chore: add my name to the chaore so that I can search after cleanup

* feat: update the forem creator signup template and copy over some stuff from the email_resgistration

* feat: update the fields

* feat: make sure that it saves

* feat: add an eye svg to the password input

* feat: update eye and eye-off svg

* feat: update the placeholder for the password field

* reveak and hide the password when clicking on the icon

* eye visiblibility functionality

* feat: display the username

* feat: show the username row when we click edit

* feat: update the interaction design

* chore: remove extra line

* chore: remove unneeded function

* feat: never show the username hint when the user field is not hidden

* feat: ensure that the username works

* chore: update the existing specs

* feat: move to packs

* refactor: manage the visibility with a avariable and not with the password type

* optimize the way we use password visibility

* chore: validate the username field

* chore: update the statement

* feat: add a background

* feat: accessibility changes

* feat: set a max length on the username

* feat: some more accessibility changes

* feat: validate the length of the password

* chore: add some margin to the error box

* feat: by_email shows the error states and we should cater for the Forem Creator

* feat: tackle any errors

* WIP/test: first pass of some integration specs

* feat: update the Cypress tests

* Update app/views/shared/authentication/_forem_creator_signup.html.erb

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

* Update app/views/shared/authentication/_forem_creator_signup.html.erb

Co-authored-by: Michael Kohl <me@citizen428.net>

* chore: temporarily disable the background on large screens

* chore: remove title

* prevent default

* feat; update the style of the button

* feat: update the tests to use accessibility tags

* feat: update icons

* chore: oops

* little forntend updates

* Update app/views/shared/authentication/_forem_creator_signup.html.erb

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

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

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

* fea: change the aria label and pressed

* feat: change to just John

* feat: update  cypress tests

* test if this is causing the test to fail

* feat: add some margin

* feat: mostly for Cypress - required is true or false based on whether the field is needed

* refactor: use the password label and skip last test

* Update app/views/shared/authentication/_forem_creator_signup.html.erb

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

* Update app/views/shared/authentication/_forem_creator_signup.html.erb

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

* fix: do not toggle  the label (accessibility)

* fix: add a comma

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Michael Kohl <me@citizen428.net>
Co-authored-by: Paweł Ludwiczak <ludwiczakpawel@gmail.com>
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
2021-08-24 10:33:26 +02:00
Andy Zhao
3b81172c56
Remove docs from repo ✂✂✂ (#14579)
* Remove docs ✂✂✂✂

* Remove all references to docs and gitdocs

* Update docs.forem.com to developers.forem.com

* Remove .gitdocs_build/

* Update yarn.lock
2021-08-23 17:23:42 -04:00
Suzanne Aitchison
f49a6ce6d5
Revise editor publish logic (#14546)
* revise publish logic

* refactor arguments
2021-08-20 09:04:11 +01:00