Commit graph

1689 commits

Author SHA1 Message Date
yheuhtozr
a6030022f6
[CP] fix multiple reaction icons joined by commas (#19288) 2023-04-04 22:34:18 +05:30
Rajat Talesra
2346d22fe9
a11y-ize reaction drawer (#19273) 2023-03-31 11:00:45 -04:00
Ridhwana
16f678cebd
feat: move the initializer to a pack file (#19279) 2023-03-31 15:33:41 +02:00
Lawrence
e4e1f4d96d
report abuse dropdown link (#19247)
* report abuse dropdown link

* Update app/controllers/pages_controller.rb

* Update app/views/shared/_display_ad.html.erb

* remove billboard url check

---------
2023-03-28 14:02:31 -05:00
Ridhwana
42b392906b
Migrate initializeUserProfilePage to webpack (#19241) 2023-03-28 12:20:49 -04:00
James Wu
a9948a41e3
Fix like icon in sidebar (#19266) 2023-03-28 12:17:10 +05:30
Ridhwana
15bb2e5a8b
Tweaks to display ad styling (#19262) 2023-03-24 12:49:27 -04:00
Ridhwana
c285cf8f9e
Promotional Flair for external Billboard (#19216)
* Users can only opt-out of external ads

* Move random sampling out of FilteredAdsQuery

* Refactor filtered_ads_query_spec

* Add test for new permit_adjacent setting

* Rubocop

* Use permit_adjacent_sponsors on article sidebar and post-comments

* Remove, unused

* Update copy

* type_matched -> type_of_ads

* Remove non-applicable test

* feat: update the bullet safe list and add eager loading with organizations

* feat: add an indicator round for promoted

* feat: update the css

* feat: add il8n

* fix: styling changes

---------

Co-authored-by: Joshua Wehner <joshua@forem.com>
2023-03-23 18:37:04 +02:00
Joshua Wehner
b812ca5955
(Really) Enable multiple reactions on #index (#19202) 2023-03-22 10:20:00 -04:00
Joshua Wehner
230e77e5cd
Update FilteredAdsQuery and user settings for opting-out of Billboards (#19208)
* Users can only opt-out of external ads

* Move random sampling out of FilteredAdsQuery

* Refactor filtered_ads_query_spec

* Add test for new permit_adjacent setting

* Rubocop

* Use permit_adjacent_sponsors on article sidebar and post-comments

* Remove, unused

* Update copy

* type_matched -> type_of_ads

* Remove non-applicable test

---------

Co-authored-by: Ridhwana <ridhwana.khan16@gmail.com>
2023-03-16 15:23:02 +02:00
Ben Halpern
22e8d802da
Billboard style tweaks (#19206)
* Billboard style tweaks

* Padding-right adjustment

* Padding adjustments
2023-03-09 13:51:42 -05:00
Rajat Talesra
a64b8b2967
Multiple reactions fixes: Hover state added & heart+ icon changed (#19196)
* Hover style added

* Multiple reactions fixes
2023-03-04 11:31:26 +05:30
Lawrence
b5744b08c6
Billboards Ownership Style Rules (#19176)
* display ad partial

* add translations

* replace views with partial

* add context types

* check if ad is community

* not fully rounded

* fix spec

* updated styling

* adjust spacing
2023-03-03 13:19:09 -06:00
Joshua Wehner
727705dc89
Revert "Enable multiple reactions on #index (including front-end render)" (#19197) 2023-03-03 09:59:51 -05:00
Joshua Wehner
8a45a4bf67
Enable multiple reactions on #index (including front-end render) (#19169)
* Revert "(Temporarily) Remove multiple reactions from #index (#19142)"

This reverts commit a45d300639.

* Clean up reaction category count mechanism for #index

* Remove, unnecessary

* Expose reaction categories in JSON response

* Update test with new categories

* Fix flaky sample / minimum floor

* buildArticle (infinite scroll) with multiple reactions

* If we're doing #index front-end, we aren't feature-flag'd

* nbsp

* react (home feed) has multiple_reactions

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

Co-authored-by: Rajat Talesra <rajat@forem.com>

* Clean up Reactable#reaction_categories

* Use 'multiple_reactions_icons_container'

* Try adding a ReactionCount test

* Adapt memory fix from 76dd53d

* Try adding categories to fixture

* Attempt to eager-load distinct public categories

* Setting dependent to the default for rubocop

* Try making image assets more public?

* Revert "Fix flaky sample / minimum floor"

---------

Co-authored-by: Rajat Talesra <rajat@forem.com>
Co-authored-by: Mac Siri <mac@forem.com>
2023-03-03 15:17:19 +01:00
Rajat Talesra
1d60c5ff77
Added dropdown to display ads / billboards (#19106)
* Initial setup work with error

* Dropdown working with error fixed

* Removed repition

* Home page billboard dropdowns added

* Created common file for dropdown

* Complete display ad dropdown usage

* Minor indentation fix

* Minor UI updates

* Minor test update

* Dropdown for billboard optimisation

* Added anchor tags

* Display ad unified code

* Design changes

* Design changes

* Changes to display ad click tracking

* Style changes

* Design change to admin display ad

* Nit fix

* Nit fix

* Updated test
2023-02-27 22:57:01 +05:30
Rajat Talesra
fdfa6837fb
Quick fix for null class check (#19171) 2023-02-23 16:15:22 -05:00
Rajat Talesra
7eae421a2a
Multiple Reactions: opens drawer on single tap - mobile device (#19155)
* Opens tap on single tap too

* Multiple Reactions single tap issue fixes

* Updated drawer heart+ icon behaviour
2023-02-22 16:15:17 +05:30
Rajat Talesra
2a694df21a
Multiple Reactions icons stack fix (#19157)
* Multiple reactions stack reversed

* Nit fix

* Make icon center
2023-02-21 15:49:05 +05:30
Ben Halpern
9b66a8e406
Make multiple reactions play nicely with edge caching (Frontend) (#19147)
* Make multiple reactions play nicely with edge caching

* Remove backend code

* Update app/assets/javascripts/initializers/initializeArticleReactions.js
2023-02-20 12:55:50 -05:00
Rajat Talesra
8c2cbab726
Mobile tap issue fix (#19121) 2023-02-16 00:38:02 +05:30
ktmouk
cec7830001
Fix the height of date and time input is small on iOS Safari (#19021)
Co-authored-by: Joshua Wehner <joshua@forem.com>
2023-02-15 10:26:20 +01:00
Rajat Talesra
2fc5e13306
Multiple Reactions minor fixes (#19107)
* Reactions minor fixes

* Notification, stack and reactions UI fixes

* Final multi reactions UI fixes
2023-02-13 22:11:55 +05:30
Lawrence
dbf766012a
Close Reaction Drawer on Outside Click (#19098)
* add a closeDrawer function for clicking outside the drawer

* check for element
2023-02-10 14:06:45 -06:00
Lawrence
0c8f301227
init commentPreview migration (#19090) 2023-02-10 12:38:13 -06:00
Lawrence
a4a54efc34
Mobile View: Padding Adjust (#19061)
* adjust bottom padding

* reset icon size

* resize spacing

* increase width for desktop drawer

* revert svg sizes

* set icon dimensions

* adjust styling to mock

* revert

* change the correct scss file
2023-02-10 12:02:47 -06:00
Joshua Wehner
567e31248a
Try right-to-left for stack effect (#19083)
* Try right-to-left for stack effect

* Reverse order to counter rtl ordering

* Better post-merge reconciliation

* Try to get test ratio boost

* Fix test
2023-02-10 11:01:03 +01:00
Rajat Talesra
0b684eb421
Multiple Reactions UI fixes (#19077)
* Multiple Reactions UI fixes

* Minor fixes
2023-02-10 10:36:04 +05:30
Rajat Talesra
37941c4f5b
Multiple Reactions icon align with text (#19079)
* Reactions icon align with text

* Nit fixes

* Nit fixes

* Made reactions clickable

* Indentation fix

* Added border to icons
2023-02-08 20:26:46 +05:30
Joshua Wehner
ea2154d506
Fixing design issues with multiple reactions (#19020)
* Try disabling text-select (mobile long-tap)

* Try to force button color on mobile safari

* Try making notification decorator more helpful

* More using notification decorator

* Helper so I can see exceptions

* As we toggle feature flag, temporary show 'heart' for unsupported reactions

* Reaction on Comment is a 'reaction'-type notification

* Temporarily add new emojis to i18n

* Render full-color, unique SVGs for multiple_reactions

* Restore card layout

* Aggregate reaction icons also need unique SVGs

* This seems unnecessary?

* Multiple is -more-than-one-

* Display *unique* reaction categories on /notifications

* Comment notification no longer needs to re-render as reaction

* Decorator needs to handle some data gaps

* Fix NotificationHelper

* Try a better name for this

* Tests for the notification decorator

* These partials wound up without an outer layer

* Add a descriptive comment

* index needs force_unique

* Try multiple reactions external img (#19076)

* Try external img SVGs

* Unique SVG might not be necessary if this works

* Can also remove this spec if successful

* Restore flash icon behavior

* Plus external img for #index as well
2023-02-08 11:39:47 +01:00
Ben Halpern
d46b54330e
Revert hidden shell cleanup (#19059) 2023-02-06 10:43:11 +02:00
Lawrence
3186f7ae2d
CommentDate Migration to Pack tag (#19025)
* migration init

* create an initializers directory

* remove console log

* migrate localDateTime functions and remove comment date from asset pipeline

* add unit test

* add one more

* year test
2023-02-03 13:40:17 -06:00
Fernando Valverde
8341c5a5dd
Fix JS error when window.Forem.runtime is not available yet (#19007)
* Add retry with timeout if window.Forem.runtime is not available

* Refactor asset pipeline initializer into webpack bundle

* Remove leftover comment

* Fix CodeQL issue

* Revert Regexp interpolation

* Revert regexp interpolation without verify

* Remove problematic Regexp marked as dangerous by CodeQL
2023-02-03 05:57:49 -06:00
Ridhwana
aa305ddcaf
remove some old service worker code (#19036) 2023-02-03 11:51:04 +02:00
Lawrence
df678d2c03
baseTracking Initializer Migration (#19016)
* baseTracking pack

* Define dataLayer

* disable unused var

* disable another unused var

* remove initializer call from base of asset pipeline

* remove asset pipeline baseTracking file
2023-02-02 13:15:36 -06:00
Rajat Talesra
f9a7b93bc1
Multiple reactions - remove circle from active reactions (#19034)
* Reading list toggle issue fix

* Removed circle border for reaction

* Added feature flag
2023-02-02 22:01:58 +05:30
Rajat Talesra
93f73636c7
Post bootstrap changes - remove headings from admin.scss (#19019)
* h1 and h2 design fixes

* h2 redesign fixes

* Removed incorrect code

* Revert incorrect test code

* h3 heading redesign

* h4,h4,h5 headings redesign

* Minor design fixes

* Fixed all heading styles

* Test case fix

* Revert incorrect if condition

* Revert incorrect if condition

* Removed non required div
2023-02-02 15:52:35 +05:30
Rajat Talesra
6204b22094
Reading list toggle issue fix (#19033) 2023-02-02 00:06:36 +05:30
Rajat Talesra
9f04c5501e
Multiple reactions ,minor fixes (#19027) 2023-02-01 21:02:48 +05:30
Rajat Talesra
d4d7d8f409
CSS: Dark mode minor fixes (#19014)
* Dark mode fixes

* Bookmark fix
2023-01-26 15:31:46 +05:30
Joshua Wehner
7f41dae631
Pages API: Read (get index+show) (#18970)
* Pages API pt 1 (read/get/index+show)

* Update spec/requests/api/v1/docs/pages_spec.rb

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

* Update spec/requests/api/v1/docs/pages_spec.rb

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

* API Key not required for index & show

* API Feature flag has long since been removed

* Page schema

* Fix spec broken by merge

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
2023-01-25 17:15:27 +01:00
Rajat Talesra
7c6f269b14
Onboarding dark mode fixees (#18996) 2023-01-25 10:53:59 +05:30
Joshua Wehner
30c0485507
Frontend for multiple reactions (v1) (#18808)
* Remove extraneous comment (see 9361d2 and 5c18f8)

* Flexible, multiple reaction types

* Fix reaction counts

* Re-use svg for active state for now

* Update yml, update spec

* Possible temp fix for failing tests

* Colorize reaction icon svgs

* Reaction engagement above post title

* Index reactions engagements (for logged-out)

* Maybe readinglist is special

* Try using crayons' dropdown as a drawer?

* readinglist isn't really public now

* feat: update the styles for the reaction drawer

* Grey background highlight, turn off border/shadow

* Read our feature flag docs, saw this was recommended

* Missed fifth emoji: party/tada

* Fix JS test errors

* Update test with tada

* Suppress flashing engagements when no public reactions

* Liberate jump-to-comments from unicorn replacement

* 'Add reaction' on tooltip

* Don't show reaction emoji on index unless it's been used

* rubocop

* Update heart+ total count when toggling

* Do not include 'readinglist' in drawer/public counts

* Fix semi-public readinglist so that icon is badged for current user

* Tweak heart-plus svg

* Style tweak: border on active reaction

* Show reacted icon on drawer trigger for 1.5 sec

* Tweak styles for engagements bar

* Style tweaks for multiple engagements (#index)

* Trying to get size working through crayons/inline_svg

* Sparkle hearts

* Restore unicorn

* Make heart-plus-active work when user has an active reaction

* Try 'hoverdown' a dropdown that activates with hover

* Long touch?

* Tap *outside* the drawer to close

* Mobile reaction drawer is also supposed to be columns

* More reaction count cleanup

* Final emoticons maybe?

* Fix reaction bug when feature disabled

* Remove readinglist from public reaction counts

* Update specs for new reaction categories

* Shuffle makes specs flaky

* Order does not matter

* rubocop

* Update to preserve readinglist analytics

* Shuffle makes specs flaky

* Fix flickering images, remove icon highlight for now

* Don't update total for readinglist

* reactions_by_user_id

* Try renaming this observer function

* Try unid ids for SVGs

* Remove local test file

* Simplistic test for the unique svg transform

* Fix javascript for current SVG

* Signifcant string literals in this case, rubocop

* Use the right expected output

Co-authored-by: Ridhwana <ridhwana.khan16@gmail.com>
2023-01-23 16:00:50 +01:00
Rajat Talesra
4ae1721848
Remove bootstrap library fully with some minor fixes (#18945)
* Minor fixes

* Replaced justify-content-between with justify-content

* Override all heading tags, paragraph tag

* Fixed a tag underline css

* Removed bootstrap library

* Removed duplicate crayons-select class
2023-01-16 20:07:12 +05:30
Lawrence
b2a643cfb4
Add CSS for upload button (#18884)
* Add CSS for upload button

* extend current crayon classes
2023-01-12 14:37:44 -06:00
Fernando González Tostado
048a718570
fix gists adding width to tds (#18933)
Co-authored-by: Fernando Valverde <fernando@fdo.cr>
2023-01-10 15:01:37 -06:00
Rajat Talesra
497f494ef3
Removed nav related classes from feedback tabs (#18924)
* Removed bootstrap from listing_categories, listings, navigation_links

* Removed not-used bootstrap classes from admin/tags

* Removed bootstrap from admin/settings

* Fix collapse glitch in profile-fields

* Feedback partial progress

* Feedback partial progress

* Removed form-control

* Replaced card with crayons-card

* Fixed profile field UI

* Removed collapse hide and show classes

* Removed collapse hide and show classes

* Removed collapse hide and show classes

* Nit height fix

* Nit width fix

* Updated tests

* Removed nav related classes from feedback tabs

* Remove btn-classes from commets too.

* Removed row and col-12 classes

* Removed bootstrap classes from Authentication

* Removed bootstrap classes from Mascot

* Removed bootstrap classes from Onboarding

* Removed bootstrap classes from lock/unlock discussions

* Notes design changes

* Removed bootstrap classes from Organization

* Removed bootstrap classes from Organization

* Remove alert bootstrap class from admin.html.erb

* Fixed tab_pane related code

* Enable click listener on notice

* Enable click listener on notice

* Applied suggested changes

* close bootstrap class removed

* Removed element completely
2023-01-09 20:18:28 +05:30
Rajat Talesra
26c72096ba
Remove bootstrap classes : collapse hide show (#18917)
* Removed bootstrap from listing_categories, listings, navigation_links

* Removed not-used bootstrap classes from admin/tags

* Removed bootstrap from admin/settings

* Fix collapse glitch in profile-fields

* Feedback partial progress

* Feedback partial progress

* Removed form-control

* Replaced card with crayons-card

* Fixed profile field UI

* Removed collapse hide and show classes

* Removed collapse hide and show classes

* Removed collapse hide and show classes

* Nit height fix

* Nit width fix

* Updated tests
2023-01-06 21:25:49 +05:30
Rajat Talesra
d61d9fbc9d
Remove bootstrap from admin/feedback and use Crayons (#18892)
* Fix collapse glitch in profile-fields

* Feedback partial progress

* Feedback partial progress

* Removed form-control

* Replaced card with crayons-card
2023-01-04 10:25:27 +05:30
Ridhwana
790870b459
Add Footer Links (#18886) 2022-12-22 20:33:02 +02:00