Commit graph

725 commits

Author SHA1 Message Date
rhymes
f9506affb5
Use faster JS selection methods (#11409)
* Add JS tips section to frontend documentation

* Replace document.getElementsByTagName('body') with document.body

* Replace querySelectorAll with faster selecting methods where appropriate

* Replace querySelector with faster selecting methods where appropriate

* Fix typo

* Fix forEach and getElementsByClassName

* Change querySelector* to faster methods in erb files

* Change querySelector* to faster methods in ruby files

* Fix runkit tag

* Various fixes

* Update app/assets/javascripts/initializers/initializeEllipsisMenu.js

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

* Update app/assets/javascripts/utilities/slideSidebar.js

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

* Commenting out flaky spec

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
2020-11-16 17:35:50 +01:00
Rafi
eab507604d
Removing data-testid from Article component (#10249) 2020-11-16 10:23:44 -05:00
Andy Zhao
97e6c2295d
Filter by tags of reading list items not tags you follow (#11394)
* Filter by tags of reading list items not tags followed

* Sort the reading list tags
2020-11-13 10:45:32 -05:00
Josh Puetz
2223e5468b
Email login always on (#11307)
* Starting out

* Building away...

* Hooking buttons up

* Hook Auth Provider buttons to Array Field

* trying to fix NoNameError

* Remains InviteOnlyMode disable and tests

* Smashing remaining tasks

* Last of tasks

* add tests

* Complete specs and tests 😅

* Fix bug

* Additional guard

* pass event to functions

* Position Email Auth first

* Fix bug in Email Auth Modal

* Fix spacing issue

* Update docs for adminModal.js

* Show/hide Enabled Indicator with Enable/Undo buttons

* Complete Auth Providers functionality

* Only update `allow_email_password_registration` from admin

* Remove duplicated methods

* Some refactoring around fact that Email Login is now always on (#11382)

* Fix merge (again!)

Co-authored-by: Arit Amana <msarit@gmail.com>
Co-authored-by: Arit Amana <32520970+msarit@users.noreply.github.com>
2020-11-12 09:32:58 -06:00
Jacob Herrington
9f62711123
Convert inline JS to Stimulus (#11364)
* Convert inline JS to Stimulus

* Use Stimulus targets over element IDs
2020-11-11 21:25:04 -06:00
Rafi
0bc475254b
Adding select option to storybook (#11338) 2020-11-11 11:36:11 -05:00
Robin Gagnon
27a3df7d73
A11y: Add keyboard navigation to article feed (#10468)
Co-authored-by: Andrew Bone <AndrewB05@gmail.com>
Co-authored-by: Nick Taylor <nick@dev.to>
2020-11-10 22:38:15 -05:00
Nick Taylor
af58e7c1a9
Set default timeout to 0 ms for keyboard shortcuts. (#11363) 2020-11-10 18:32:29 -05:00
Andrew Bone
75bec9b705
Add chaining to shortcuts (#11113)
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
2020-11-10 09:21:39 -05:00
Arit Amana
4d93112084
Make final Auth Provider Refactor code changes (#11303) 2020-11-07 07:49:16 -05:00
Arit Amana
08796b5cee
[Team Email Login] Refactor Authentication Provider Enable/Disable (#11185)
* Starting out

* Building away...

* Hooking buttons up

* Hook Auth Provider buttons to Array Field

* trying to fix NoNameError

* Remains InviteOnlyMode disable and tests

* Smashing remaining tasks

* Last of tasks

* add tests

* Complete specs and tests 😅

* Fix bug

* Additional guard

* pass event to functions

* Position Email Auth first

* Fix bug in Email Auth Modal

* Fix spacing issue

* Update docs for adminModal.js

* Show/hide Enabled Indicator with Enable/Undo buttons

* Complete Auth Providers functionality

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

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

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

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

* Update app/controllers/admin/configs_controller.rb

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

* Update helper names

* better implementation of EnabledIndicator show/hide

* Small copy changes

* Update spec/helpers/authentication_helper_spec.rb

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

* Update app/views/admin/configs/show.html.erb

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

* Update app/helpers/authentication_helper.rb

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

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
2020-11-06 18:19:34 -05:00
Rafi
d80f918efa
Fixing flag user modal (#11221) 2020-11-05 10:05:37 -05:00
Sarthak Sharma
708791f986
🚀 Feature: Give Tab Notification on New Message (#9847)
Co-authored-by: Narender Singh <narender2031@gmail.com>
2020-11-04 16:34:01 -05:00
Lisa Sy
8d08191e9a
[Front-End Q/A] Config Authentication view (#11169)
* Update spacing and add Crayons classes

* Update modal interaction and style

* WIP Hide collapsed container

* Refactor invite only mode UX using tooltip

* Fix recaptcha toggle

* Implement button-text change and enabled-indicator hide

* Remove small icon alignment

* Update app/views/admin/configs/show.html.erb

* Fix icon and row alignment

* Fix enabled-indicator bug

Co-authored-by: Arit Amana <msarit@gmail.com>
2020-11-03 20:12:19 -08:00
Rafi
9b02f1619b
Fixing tags in listing modal (#11251) 2020-11-03 12:01:55 -05:00
Krzysztof Rybka
e3495be608
Render followed tags only if container available (#11054) 2020-11-02 16:43:37 -05:00
Ivan
3ad0e27f8c
fix for code fullscreen action on comment page (#11224) 2020-11-02 10:57:45 +01:00
ludwiczakpawel
44466532dd
Z-index cleanups (#11157)
* tooltips 1.0.1

* tooltips 1.0.1

* cleanup css

* few more fixes

* fix
2020-10-30 16:03:23 +01:00
Rafal Trojanowski
4bc8b80a90
Introduce tweet_timeline liquid tag (#7605) (#10825) 2020-10-30 11:03:40 +01:00
Arit Amana
e00cb5df17
[Team Email Login] Genericize AdminConfig Modal (#11145)
* Genericize AdminConfig Modal

* Rename function, add JSDoc documentation

* Tests for modal-building function

* Still trying to get jest test to pass

* Fix failing jest test
2020-10-29 15:01:37 -04:00
ludwiczakpawel
dc3bcd8913
Drop custom color pickers (#11154)
* tooltips 1.0.1

* tooltips 1.0.1

* drop custom js color picker
2020-10-29 14:35:47 +01:00
Rafi
52f2627e6c
Refactoring EditorAction (#10894)
* Refactoring EditorAction

* Removing useCallback

* Renaming variables to isVersionX
2020-10-29 09:06:30 +01:00
Mac Siri
8ba2c03360
[deploy] Encode domain name in pusher channels (#11136)
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
2020-10-28 14:52:38 -04:00
Arit Amana
1912ffdc46
[Team Email Login] Refactor the Email Authentication flow (#11090)
* Hooked "Enable" button to hidden checkbox

* Hooked "Close" button to close email settings and show "Enable/Edit" button

* Additional hookups

* Start building generalized Modal blocks

* Everything hooked up except styling and a few Qs

* last of the hookups; ensure logic flow

* clean up

* specs to cover email auth refactor

* Fix bug surfaced by Vaidehi

* Incorporate PR feedback

* prevent email auth disable if invite-only-mode

* adjust emailAuthModal body text

* Sundry improvements

* Last-mile tweaks

* Trying to get 3rd party auth deselect to work

* delete unnecssary function

* remove superfluous comment

* Move inline styling into CSS file

* Incorporate PR feedback

* Incorporate more PR feedback

* Make Confirm btn intent clearer

* Add TODO comment
2020-10-28 13:37:11 -04:00
Rafi
c9014a7835
Removing email prop and fixing test (#11108) 2020-10-27 15:38:31 -04:00
Jacob Herrington
c91c07920f
Add config option for Forem collective noun (#11107)
Not everyone will want to use "Community" to describe their Forem, so
now they have some flexibility there.
2020-10-27 12:45:52 -04:00
Robin Gagnon
10d7da2878
feat: Add shortcut to bookmark an article (#11116) 2020-10-27 12:44:03 -04:00
Lisa Sy
126c2401e3
Improve small screen display of Mod Center (#10621) [deploy]
* Add page-header padding and overflow-x for tabs

* Split into two moderator files and move into Views folder

* Add page-header padding style

* Increase font size of crayons-tag on small screen

* Improve small screen view of menu and grid rows in mod center

* Fix date alignment

* Update after first PR revision

* Re-update

* Fix stylesheet reference
2020-10-27 07:46:52 -07:00
Cassey Lottman
64dce93088
clarify how to add multiple tags (#11082) 2020-10-26 14:57:51 +01:00
Nick Taylor
d5dcda6af6
Renamed internal.js pack file to admin.js (#11046) 2020-10-23 17:57:39 -04:00
Nick Taylor
82d659be8f
Fix Search Navigation Disconnect Between URL and Search Input (#11009) 2020-10-22 12:37:26 -04:00
Andrew Bone
c629459ba9
refactor: Use keyboard shortcut hook in article form (#11014)
* Move to new keyboard shortcuts

* No longer required

* Import order

* Import order

* Add trailing comma

* Remove keyboardShortcutsHandler from exports

* Remove pointless arrow function
2020-10-22 12:03:10 -04:00
Robin Gagnon
3c586d7170
refactor: Use keyboard shortcut hook in listing modal (#11017) 2020-10-22 12:02:17 -04:00
Sarthak Sharma
e36690cdba
Making Compose's Placeholder Dynamic (#11016) 2020-10-22 12:01:40 -04:00
Andrew Bone
b7dfb2495a
Allow keyboard shortcuts (#10713)
* Create keyboardShortcuts.jsx

Add handler for keyboard shortcuts

* Match github's hotkey style

Makes objects clearer.

* Update keyboardShortcuts.jsx

* Allow single character shortcuts

update to allow single character shortcuts/hotkeys

* Add component documentation

Add inline documentation for the component.

* Fix example typo

* Move keyboardShortcuts to a hook

* Fixed useKeyboardShortcuts example

* Rename keyboardShortcuts.jsx to useKeyboardShortcuts.jsx

* Rebuild

* Move isFormField outside render cycle

Move the isFormField function outside of the render cycle.

* Prevent event listener on empty object

Don't add an event listener if the shortcuts property is an empty object or is null

* Add tests for useKeyboardShortcuts

Initial pass for adding tests to useKeyboardShortcuts

* Missed unmount

Missed a whole word...

* Fix typos

* Convert function type

* Add new test cases.

* Missing brackets

* Typo

* Update useKeyboardShortcuts.test.jsx

* Move event listener to document

* Update tests

* Use testing-library/user-event

* Correct fireEvent

* Update keyDown

* Slight tidy

* Change order, just in case

* Swap to render

* Make function async

* Rerun travis

* Add rerender

* Fix render function

* check event.key for fallback
2020-10-22 13:45:42 +02:00
Jacob Herrington
f52aaa3610
[deploy] Add a simple image uploader partial (#10884)
* Add a simple image uploader partial

* Trigger Travis CI

Co-authored-by: rhymes <rhymes@hey.com>
2020-10-21 16:41:50 +02:00
Ben Halpern
f428aa85fc
[deploy] Remove unnecessary email call-to-action (#10972) 2020-10-20 19:19:50 -04:00
Ben Halpern
467e99556c
[deploy] Fix tag display bug and crayonsify area (#10868)
* Fix tag display bug and crayonsify

* Fix some specs

* Remove unused tag js

* Adjust to remove crayons card bg

* Adjust padding

* add spacing below nav

* drop unnecessary classname

* cleanup headers

* links

* Finalize style and add hint to eliminate div jump

Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com>
2020-10-20 16:07:17 -04:00
Rafi
e3076a0852
[deploy] Removing hard-coded email (#10125)
* Removing hardcoded email

* Passing email address from siteConfig to react

* Passing modFaqEmail props in tests

* Changing webpacker compiler order
2020-10-20 18:59:51 +02:00
Molly Struve
330d849759
[deploy] Spec Fix:Add Fragment to test html (#10963) 2020-10-20 11:40:42 -05:00
PrimeNoodles
ff68888a04
Mod Center: clicking on article title opens a in new tab (#9314) 2020-10-20 11:23:04 -04:00
Arit Amana
8e57cf17ad
[Team Email Login] Admin enable/disable recaptcha during email signup (#10846)
* Initial Implementation

* Complete hookup of recaptcha guard

* Write tests for recaptcha during email signup

* Addressing PR changes 1

* Create helper method and write specs

* fix bug
2020-10-19 16:20:18 -04:00
Michael Kohl
adb41a0a15
Uncheck email preferences by default (#10919)
* Uncheck email preferences by default

* Fix specs

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

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

Co-authored-by: Molly Struve <mollylbs@gmail.com>
2020-10-19 10:20:03 -04:00
Nick Taylor
57f3863d09
Added the <ConnectStateProvider /> (#9799)
* Added the <ConnectStateProvider />

* Moved <ConnectStateProvider /> to chat/components.
2020-10-19 05:18:04 -04:00
narender2031
72c7aedd1f
fix bug on chat input (#10755) 2020-10-18 21:57:59 -04:00
Mac Siri
dd8745ca33
[deploy] Store Article's main_image path unprocessed (#10867) 2020-10-16 14:46:37 -04:00
narender2031
2461069254
fix request center UI (#10824)
* fix request center UI

* remove not require css

* removed not used classes
2020-10-15 10:46:26 -04:00
Akshay Mahajan
ff918daa20
Remove flare tag from title and hightlight it within the tags row (#10528)
* Remove flare tag from title and hightlight it within the tags row

* wrap flare tag # in a span with class crayons-tag__prefix

* updated buildArticleHTML.js to show flare tag in the tags row

* updated _single_story.html.erb to show flare tag in the tags row

* fixed missing opening tag

* removed crayons-story__flare-tag class and containers

* added .crayons-story__flare-tag back to stories.scss for search results

* added check for undefined tagList in buildArticleHTML.js
2020-10-15 16:09:14 +02:00
Rafi
906811ef3c
Extracting prettier config (#10847)
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
2020-10-14 22:28:31 -04:00
ludwiczakpawel
ebe398ba23
[deploy] Logo updates (#10840)
* logo updates

* fix

* fix

* drop it like its hot

* no siteconfig

* um...
2020-10-14 16:13:42 -04:00