Commit graph

4524 commits

Author SHA1 Message Date
Molly Struve
3884009f08
Spec Fix:Set Javascript Locale to Match Time.zone (#11025) 2020-10-26 07:51:32 -05:00
PakkuDon
e4865a6072
Truncate long tags in sidebar (#11057)
Resolves https://github.com/forem/forem/issues/10990
2020-10-26 12:36:24 +01:00
Rafi
42014f7fb9
Replacing old button with crayons buttons to make it more visible (#11080)
* Using crayon button

* Converting to secondary button
2020-10-26 12:35:20 +01:00
Krzysztof Rybka
6d0dab5e1d
Remove duplicated nav in sidebar_nav (#11053) 2020-10-26 12:27:37 +01:00
Krzysztof Rybka
2078490ba7
Extract subtitles to a constant to reduce allocations (#11056) 2020-10-26 12:27:15 +01:00
Jacob Herrington
4dde307a43
Fix NoMethodError for tag moderators channel (#11047)
* Fix NoMethodError for tag moderators channel

In development, it is possible to hit a NoMethodError when adding a tag
moderator because the "tag-moderator" slug is hard-coded.

This change helps mitigate that by adding a safe navigation operator. We
can always remove it if we decide to get rid of the hard-coded value.

Secondarily, it adds this channel to the seeds file, since we pretty
much expect it to exist.

* Move nested conditional
2020-10-23 21:02:54 -05:00
Nick Taylor
d5dcda6af6
Renamed internal.js pack file to admin.js (#11046) 2020-10-23 17:57:39 -04:00
rhymes
b6762fcc7b
[deploy] Add temporary RSS reader worker to gather monitoring data (#11037) 2020-10-23 12:02:08 -05:00
Molly Struve
17535cd90b
[deploy] Bug Fix:Use local_date Helper for All Published Timestamps (#11028) 2020-10-23 11:43:18 -05:00
Julianna Tetreault
8fb1a3824a
Add Explore Tags for Signed-In Users (#11022) [deploy]
* Adds an Explore Tag section for logged in users
  - Logged in users who follow no tags are shown Explore Tags
  - Links to the /tags page
  - Shows top 5 tags below Explore Tags header

* WIP: Adds a test around logged in users who do not follow tags

* Refactors spec to test Explore Tags functionality and adjusts id in _sidebar_nav

* Replaces cog svg with linked header

* Implements design suggestions for Explore and adjusts test
2020-10-23 09:06:41 -06:00
Vaidehi Joshi
d008f89399
Forem creator feature flag + onboarding signup form (#11031)
* Add initial forem creator signup form

* Fix label typos in various stylesheets :)
2020-10-23 10:52:21 -04:00
ludwiczakpawel
b9ce3c2a8b
fix admin logo preview size (#11034) 2020-10-23 10:14:44 -04:00
ludwiczakpawel
4c380a6ba6
icon (#11035) 2020-10-23 10:14:01 -04:00
Jacob Herrington
ff177b0c09
[deploy] Only show user count for large userbases (#11021)
This is a request from one of our early adopter Forems. We should only
render the user count that appears on most of our sign up CTAs when a
Forem has a large userbase (initially, I'm setting that to 1000 users).

The change also removes a lot of duplicated markup by using some
partials to render the copy in the various auth CTAs.

Hopefully, this is written in such a way that changing opening up more
fine-grained control of these partials is trivial.
2020-10-23 09:00:59 -05:00
Ben Halpern
5b1f058764
[deploy] Fix honeybadger console error (#11030) 2020-10-23 12:17:45 +02:00
Ben Halpern
6fac74b741
[deploy] Experiment with the removal of inline critical path css (#11027)
* Experiment with the removal of inline critical path css

* Fix up tests, remove reference to deleted file

* Change docs

* Fix typo
2020-10-22 19:22:28 -04:00
Vaidehi Joshi
429d9fb947
Use APP_NAME rather than APP_DOMAIN in chat channels (#11029)
* Use APP_NAME rather than APP_DOMAIN in chat channels

APP_NAME may not always be set (it is not "required" per se), which can
cause issues while deriving the pusher_channels. We should use APP_DOMAIN,
which is more common and always has a default value.

* Add TODO to make pusher channels more unique
2020-10-22 19:22:19 -04:00
Ben Halpern
2d75d6d5ea
Fix missing registration data change (#11008)
* Fix missing registration acknowledgment

* Add backfill script and seeds adjustment

* Update lib/data_update_scripts/20201022161311_backfill_user_registrations_in_registrations_controller_path.rb

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

Co-authored-by: Molly Struve <mollylbs@gmail.com>
2020-10-22 19:21:03 -04:00
Julianna Tetreault
1733c88a07
Ability to Mark Podcasts as Published in Admin Podcasts (#11024) [deploy]
* Adds ability to publish/unpublish Podcasts via /admin/podacasts/id/edit
  - Moves ability to Admin to remove reliability of resource_admin
  - Adds published to podcast_params in Admin::PodcastsController

* Adds a test to check the successful publishing of a podcast in podcasts_spec.rb

* Reverts change to podcast.reload in podcasts_spec.rb
2020-10-22 14:35:58 -06:00
Nick Taylor
82d659be8f
Fix Search Navigation Disconnect Between URL and Search Input (#11009) 2020-10-22 12:37:26 -04:00
Molly Struve
f54549cca3
[deploy] Optimization:Remove 2 Feed Experiments (#11007) 2020-10-22 11:22:00 -05: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
ludwiczakpawel
a46c779dea
[deploy] Missing placeholders on profile settings (#11015)
* .

* revert
2020-10-22 16:07:10 +02: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
ludwiczakpawel
4caad99584
Fix for color fields in settings (#10984)
* form fix

* color pickers and description
2020-10-22 11:06:57 +02:00
Ben Halpern
5457f0c0b7
[deploy] Bust caches when navigation links are changed (#10865)
* Bust caches when navigation links are changed

* Remove extra line

* Add admin_action_taken_at to SiteConfig to reference later

* Format timestamp with rfc3339 and fix Specs

Co-authored-by: mstruve <mollylbs@gmail.com>
2020-10-21 21:30:31 -04:00
ludwiczakpawel
7c2c6ecccc
Placeholder assets (#11005)
* icon + social media cover

* mascot

* optimized mascot
2020-10-21 21:29:24 -04:00
Jacob Herrington
380d8ebcd5
Add campaign call to action to SiteConfig (#10997)
* Ignore LineLength cop for SiteConfig constants

* Add campaign call to action to SiteConfig
2020-10-21 21:27:53 -04:00
Ben Halpern
7675379b6b
Fix honeybadger key typo (#10991) 2020-10-21 15:51:12 -04:00
Lisa Sy
a64b85ff5e
Update [Rate Limit] form fields with crayons and add TITLE (#10858) [deploy]
* Update form fields with crayons and add TITLE

* Fix merge conflicts and merge w master
2020-10-21 12:43:01 -07:00
Julianna Tetreault
0b2fb08e32
Adds a constant, SVG_PLACEHOLDER, to site_config.rb (#11001) 2020-10-21 15:28:02 -04:00
Andy Zhao
60b18d1a80
Add Mailchimp API Key to Site Config Form (#10995)
* Add Mailchimp API key to config show page

* Update description for newsletter id
2020-10-21 13:19:54 -04:00
Jacob Herrington
35648a696c
Add a link to the Forem Admin Guide to /admin (#11000) 2020-10-21 12:13:41 -05:00
Julianna Tetreault
cfbb5a1763
Standardize Image Placeholder Text in SiteConfig (#10992) [deploy]
* Standardizes image placeholder text in SiteConfig

* Adjusts image placeholder text URL per review suggestion

* Pulls image placeholder text out into a constant, IMAGE_PLACEHOLDER
2020-10-21 10:57:27 -06: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
5828b8f38d
Fix admin link (#10985) 2020-10-21 10:34:59 -04:00
Ben Halpern
a6923d530b
[deploy] Add interface for feed number config (#10969)
* Add interface for feed number config

* Fix tests

* Allow list values

* Fix lint
2020-10-21 09:01:00 -04:00
Michael Kohl
87c89d8915
Make profile fields without user columns work (#10978) 2020-10-21 08:17:35 -04:00
ludwiczakpawel
1570d0cf0a
form fix (#10982) 2020-10-21 08:16:55 -04:00
Elliot
6a1f560f65
[deploy] Fix dropdowns breaking after adding comment (#10976)
What was wrong?
`initializeCommentDropdown` is called when a new comment is added.
`initializeCommentDropdown` calls `addDropdownListener(dropdown)` on all
`.dropbtn` elements. Elements with the `.dropbtn` class already exist on
the page so an extra listener is added to it whenever a comment is
added.

How was it fixed?
Whenever a dropdown listener is added to an element with the
`.dropbtn` class, an attribute is set on that element so we know it
already has a dropdown listener. When we add listeners to elements with
the `.dropbtn` class in the future, we don't add them to elements with
the attribute.
2020-10-21 08:15:10 -04:00
benhalpern
3126e508f7 Make basic posts query rely on SitConfig value 2020-10-21 08:11:54 -04:00
Alex Timofeev
ae67e17678
Fill organization userpic background fully to avoid empty corners (#10944)
* Fill organization userpic background fully to avoid empty corners

* Reset `.crayons-logo` ::after pseudo element content

So the barely visible border is hidden for profiles
2020-10-21 12:11:41 +02:00
Ridhwana
dae7565652
feat: add the social media back (#10981) 2020-10-21 11:53:13 +02:00
Ben Halpern
7ba7529e4f
Remove social icons from user liquid tag (#10977) 2020-10-20 21:58:22 -04:00
Mac Siri
68c6205534
Prefer inline svg over image_tag in User Liquid (#10970) 2020-10-20 21:35:17 -04:00
Ben Halpern
dc91840a71
Small adjustment to blackbox.rb (#10961) 2020-10-20 21:14:56 -04:00
Ben Halpern
f428aa85fc
[deploy] Remove unnecessary email call-to-action (#10972) 2020-10-20 19:19:50 -04:00
Jacob Herrington
173e79bdfa
Add a button to delete pages (#10971) 2020-10-20 17:49:17 -05:00