Commit graph

1022 commits

Author SHA1 Message Date
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
Michael Kohl
6b2160f307
Theming cleanup (#15237)
* Theming cleanup

* Fix specs

* Use correct method

* Update storybook theme switcher
2021-11-09 10:11:55 -05:00
Arit Amana
dcf1e08477
Remove chars-count from user fields; fix inconsistent loading (#15309)
* remove chars-count from user fields; fix inconsistent loading

* remove "if loaded" check

* simplify iteration
2021-11-09 08:27:18 -05:00
ludwiczakpawel
0cf6d7616d
generator cleanup (#15284) 2021-11-08 11:55:24 +01:00
Arit Amana
4f1bdcda22
[Small Wins] Show character limits for profile inputs (#15255)
* Start implementation

* Extend raw implementation; will refactor later

* still building

* basic implementation

* create JS pack

* Rename JS pack; use existing CSS property

* complete implementation for profile fields

* Add guard againt irrelevant profile fields

* extract view logic to helper and add specs
2021-11-05 09:11:42 -04:00
Suzanne Aitchison
89faac306a
treat cmd and ctrl key shortcuts separately on macOS (#15265)
* treat cmd and ctrl key shortcuts differently on macOS

* consolidate shortcut key string into Runtime helper
2021-11-03 11:54:15 +00:00
Kushal Niroula
87244c345c
Fix: cannot unpin articles using checkbox (#15090)
Co-authored-by: rhymes <github@rhymes.dev>
Co-authored-by: Arit Amana <msarit@gmail.com>
2021-11-02 13:50:56 -04:00
ludwiczakpawel
15b9c0be96
CSS cleanups (#15198)
* cleanups

* whoops

* ...

* add pseudo snackbar
2021-11-02 09:29:57 +01:00
Julianna Tetreault
4a9f442354
Creator Onboarding: Creator Setup View (#14728)
Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
Co-authored-by: Yhëhtozr <conlang2012@outlook.com>
Co-authored-by: yheuhtozr <84892012+yheuhtozr@users.noreply.github.com>
Co-authored-by: Nick Taylor <nick@dev.to>
2021-11-01 15:50:08 -04:00
Michael Kohl
1458b3ef56
[15-minute fix] Add js-routes gem (#15133)
* Add js-routes gem

* Update config/initializers/js_routes.rb

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

* Remove routes form base.jsx

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2021-11-01 10:08:15 +07:00
Ridhwana
aa6d80bc5d
Only enable user invitations page when SMTP is enabled (#15219)
* first pass of styling of the page

* feat: scroll to the position in the config controller in stimulus

* feat: add the tooltip and a cursor thats not allowed

* feat: add a disabled property for all that needs smtp to be enabled

* feat: update the form styling

* feat: update the form

* specs: update the label name

* fix: syntax error

* chore: update the newline

* spec: test the invitation flow

* fix test

* feat: update the form as per suggestions

* spec: update the tests to match the new workflow

* oops committed debugging code

* chore: add a before to set the smtp_enabled method

* feat: update the boldness and fontsize of the link

* feat: remove size
2021-10-29 17:41:30 +02:00
Michael Kohl
0fab8d6634
Theming changes part 1: Rename default and night_theme (#15176) 2021-10-28 07:55:46 -04:00
ludwiczakpawel
88a3b573ea
Page headers unified (#15158)
* fix; remove the bottom 100%

* dashboard

* fixes + magic border-radius

* everything

* fix

* fix

* spec

* split PRs

* Update app/assets/stylesheets/views/listings.scss

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>

Co-authored-by: Ridhwana <ridhwana.khan16@gmail.com>
2021-10-25 21:41:29 +02:00
Andy Zhao
864fd9e072
Use proper Node version for Storybook (#15182)
* Try using Netlify pre-built yarn

* Add env vars to maybe trigger Yarn

* shrug

* Try using npm to build storybook

* Add  npm install

* Update node version and use original command

* Update yarn version

* idk :(

* Try pulling versions from files instead of hardcoding

* Possibly in root already?

* never mind dynamic var usage is not supported

* yarn version prob unused b/c we technically use npm
2021-10-25 15:29:03 -04:00
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