Commit graph

1382 commits

Author SHA1 Message Date
Mac Siri
afa73e06e3
Replace Webpacker with Esbuild (#20470)
* Migrate to esbuild WIP

* Add exclude

* Remove redundant file

* Move file

* Move to javascript_include_tag

* Lint fix

* WIP

* WIP

* Add watch mode to esbuild WIP

* Get jest working

* Remove babel

* Revert "Remove babel"

This reverts commit 6da35260aa19d6f97f586deb66c0ecaf48433b73.

* More WIP

* Got image to load

* WIP

* Resolve audit

* Lint fix

* WIP

* Fix jest spec

* [CI] Remove asset-restore for test build stage

* Production compliant

* Temp disable sourcemap

* Update glob

* Add esbuild helper to stimulus

* Import fragment

* Temp disable coverage to see failing tests

* Fix broken spec

* Address lint

* Set proper es6 target

* Use esbuild for everything

* wait what

* Revert "Set proper es6 target"

This reverts commit 98f5278093421baa8ffe2ca580845b01c1a1eadf.

* Revert "Use esbuild for everything"

This reverts commit 0ac46738f07ffcb6af095ccb1ffa5e439b7fefa3.

* Replace uglifier with terser

* New compiled assets version

* Remvoe honeybadger-io/webpack

* Remove cypress coverage checks for now

* Update jsconfig.json

* Update docker-compose

* Remove public/packs-test from ci cache
2024-01-25 20:29:21 +00:00
Philip How
d615fcef56
Add new members filter to mod center (#20542)
* fix jest

* Update safe_params_list.vcl

---------

Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2024-01-23 16:07:45 -05:00
Ben Halpern
ae2371d9a4
Add configuration for admins to determine whether to show cookie banner (#20517)
* Cookie banner admin config (wip)

* GA4 consent mode based on cookie acceptance

* Fix i18n

* Merge upstream

* Adjust heading
2024-01-15 18:22:17 +00:00
Philip How
4be6df8baf
Show tips on the post help content + update styles (#20415)
* change in article help content + styles

* some attempt at keyboard navigation

* fix v1 editor
2024-01-11 14:55:14 +00:00
Ben Halpern
f4081b2e24
Functionality to allow admins to add a cookie consent notice (part 2) (#20488)
* Initial work on base cookie modal

* Update app/assets/stylesheets/components/modals.scss
2024-01-04 16:20:03 -05:00
Anna Buianova
40d1208b46
Removed github/time-elements (#20480) 2023-12-28 13:37:14 +00:00
Ben Halpern
fd77c7671d
Track article id on billboard clicks (#20447) 2023-12-12 22:21:32 +00:00
Ben Halpern
55997ffba8
Hide images if error on billboards to fix blocking page (#20419)
* Hide images if error on billboards

* Update app/javascript/packs/billboard.js
2023-12-05 09:02:27 -05:00
Ben Halpern
9eaff67318
Update styling and refine features for analytics page (#20410)
* Update styling and refine features for analytics page

* Remove follower reference from js

* Update html

* Adjust test
2023-11-30 16:07:16 -05:00
ktmouk
1e0d70b530
Fix an error message not showing on the onboarding page (#20313)
* Fix an error message not showing on the onboarding page

* Add a test

* Fix a test
2023-11-20 20:29:23 +00:00
Ben Halpern
e7fc1bb0ce
Add article id and geolocation info to billboard events (#20329)
* Add article id and geolocation info to billboard events

* Confirm destroyed in rollup
2023-11-09 12:43:23 -05:00
Ben Halpern
0ddb133c49
Add ability for admins to request specific billboards for inspection (#20311) 2023-11-02 16:58:28 -04:00
Lucas Mateus Batista Polles
59860df04a
fix: tool editor disappears when dragging words (#20271)
Co-authored-by: Mac Siri <mac@forem.com>
Co-authored-by: Anna Buianova <lightallloy@gmail.com>
2023-10-31 17:38:39 -04:00
Julia Undeutsch
9df24fc1f7
Add title="Check" to svg icon (#20285) 2023-10-30 17:04:54 -04:00
Ben Halpern
b0cb5540c0
Add new render mode and template options for billboards (#20282)
* Add new render and template modes for billboards

* Add new fields to /admin

* Adjust test

* Adjust markup in form

* Add tests for script execution

* Add two script test

* Adjust scripts

* Adjust scripts

* Add new test

* Add new explicit tests

* Move JS functionaity around
2023-10-30 14:56:09 -04:00
ktmouk
8963e185f8
Fix username combobox tries to load all users (#20227)
* Fix username combobox tries to load all users

* Add the limit param to the users_query

* Add a comment
2023-10-25 15:53:53 -04:00
Ben Halpern
3bc1b242ce
Fix the data passed into the email newsletter (#20277)
* Fix the data passed into the email newsletter

* Add check for element existing
2023-10-24 15:29:10 -04:00
ktmouk
2314043432
Fix anchors not working (#20255) 2023-10-19 15:32:52 -04:00
ktmouk
3b37658df5
Fix lint:frontend warnings (#20256) 2023-10-19 12:59:54 -04:00
ktmouk
1beb221531
Fix tests that fail when developer uses a non-en locale (#20230) 2023-10-11 09:39:25 -04:00
ktmouk
282004c72a
Fix the sidebar not desplayed when the path contains /locale (#20030)
Co-authored-by: Joshua Wehner <joshua@forem.com>
2023-10-06 17:24:19 +07:00
Lucas Mateus Batista Polles
799043abea
Fix flag user modal on mod page (#20189) 2023-10-04 18:49:21 -04:00
Ridhwana
ae9d1b5ace
Hide the buttons on the tag page (#20148)
* feat: step 1 - add the buttons to the html template

* refactor: renamed the class to be prepended with js-

* feat: add the js-tag-card class to the entire tag-card div

* feat: add the relevant data elements and tag-id to the tag-card div

* feat: add the required data elements for the top level js-tag-card

* feat: use @tag instead of tag

* refactor: rename the tag pack file

* refactor: rename the Tag file component

* feat: add a snackzone so that the snackbar can be added there

* feat: remove the follow-actions-button and the hide-actions-button from the tag pages so that it doesn't conflict with the 'followButtons' pack whne we need to add it

* spec: update the specs for tags

* chore: follow-action-button renamed to follow-tag-button and hide-action-button to hide-tag-button

* refactor: js-classes

* chore: add some comments

---------

Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2023-09-26 19:49:57 -04:00
Joshua Wehner
6a48b486ca
Onboarding: custom newsletter opt-in settings (#20114)
* Settings can process markdown into html

* Update Settings with new onboarding settings

* Async render onboarding newsletter step

* Tweak onboarding design

* Fix broken spec

* Better rendered component test

* Tweaks to match design

* Try to tweak design

* Try having a default state

* Tweak placeholder content

* Better await componentDidMount

* Continue to tweak the design

* ContentRenderer#process should always return Result

* Try more clarity in the partial

* Rubocop
2023-09-26 06:34:19 -04:00
Rajat Talesra
1d73f871f2
Janky bug fix (#20147) 2023-09-21 16:37:44 +05:30
Joshua Wehner
13f4aaa0fb
Username inputs for admin (#20123)
* Support username inputs on /admin/articles

* Support username input on tag admin moderator

* Support username input on admin community settings

* Support username input on admin mascot settings
2023-09-20 09:25:38 -04:00
Rajat Talesra
54131cd94c
Move the digest email opt-in to the follow tags onboarding step (#20133)
* Removed intro slide and updated sequence

* Revert db change

* Initial save

* Design changes

* Mobile designs

* Added functionality

* Added tests

* Gradient effect added

* Added API call test
2023-09-20 17:55:29 +05:30
PJ
90944bb36b
Skip feed events e2e specs (#20124) 2023-09-15 17:36:08 +01:00
PJ
84a65f0a26
remove blocking attribute (#20116) 2023-09-15 10:35:35 -04:00
Joshua Wehner
c91a652245
Allow trusted users to see whether a user is suspended (#20061)
* Async append user suspended status pill

* Rubocop

* Relocate JS tests, for build & coverage

* Better error-handling for this controller

* Refactor HTML to render pill outside h1

* Continuing to tweak design

* JS class prepended
2023-09-15 08:44:31 -04:00
Joshua Wehner
6fe9d7d7a6
Allow org admins to add members as co-authors (#20008)
* Basics might be working?

* Stop propagating button clicks in autocomplete pills

* Better blank slate

* Better location to stop propagation

* Remove author_id from org co-authors

* Move UserStore and try testing it

* Remove extraneous comments

* OH... that's what that does!

* Very basic testing

* Re-organize javascripts

* Rename & re-org for testing

* Cleanup

* More tests

* Remove unnecessary nesting

* Coninuing to try to bump coverage

* Include /packs/ in code coverage metric

* Try tweaking jest coverage more?

We probably can't collect coverage from all of packs/* (because coverage is too low) but maybe we can try to opt-in for newer areas as we go?

* Relocate JS tests, for build & coverage

* User ID exception on search, not fetch

* Remove commented-out console.log

---------

Co-authored-by: Mac Siri <krairit.siri@gmail.com>
2023-09-15 08:12:41 -04:00
Rajat Talesra
c72c52dfdb
Removed intro slide and updated sequence (#20011)
* Removed intro slide and updated sequence

* Revert db change
2023-09-14 20:26:47 +05:30
Duke Greene
7d1d0ff80b
comment out flaky specs and add comments for exploration/refactor (#20103)
* comment out flaky specs and add commments for exploration/refactor context

* comment out only the specs which call reload for now

* use it.skip rather than commenting out
2023-09-14 06:25:27 -04:00
PJ
3f922921e5
Admin setting to control enabled countries for billboard geotargeting (#20083)
* use instance setting for enabled target geolocations

* add validation for enabled geolocations setting

* a start on the UI?

* backend tweaks for UI

* proper crack at autocomplete component

* fix region targeting toggle

* e2e spec
2023-09-12 12:06:00 -04:00
PJ
95ca9d37c5
Record feed events for public reactions (#20079)
* create feed event on feed reaction

* move feed event creation to feed event model

* tiny whoops

* fix failing specs

* slightly less flaky e2e spec (maybe)

* tiny fixes (couldn't resist)
2023-09-12 08:36:10 -04:00
PJ
3f7d1fbc1a
Create feed impression and click events (#20043)
* getting started: model setup

* basic controller action & spec

* somewhat working click events

* pick up on impressions

* there was an attempt at batching without duplicates

* (better) bulk upsert service

* fix specs?

* touch up feed events JS

* end-to-end specs??

* workers wip

* fix failing user delete spec
2023-09-11 13:32:36 +01:00
Ridhwana
789907d289
Tags Dashboard Error Handling (#20051)
* feat: add an error modal for the dashboard page tags

* spec: add the tests for the tags dashboard pages

* spec: add the tests for the hiding tags dashboard pages
2023-09-11 11:41:56 +02:00
Ridhwana
3c34de120b
Add snackbars to /tags (#20046)
* feat: add snackbars to /tags

* chore: update the props for the component"

* feat: update snackbar for following

* feat: add tests for snackbars

* feat: add error handling and show error on snackbar

* chore: tweaks to syntax

* refactor: abstract out the details

* fix: check for null explicitly

* refactor: use hidden instead of assigning a var
2023-09-07 12:03:41 +02:00
Ridhwana
4a8dc9abf6
Unhiding a tag should unfollow it too (#20040)
* feat: update the logic for hiding adn unhidng a tag on /tags

* feat: update the logic for hiding and unhidng a tag on /dashboard/following_tags|hidden_tags

* spec: update the tests for the /tags dashboard

* spec: removes the nav item count spec
2023-09-07 10:35:17 +02:00
Ridhwana
5951beebcb
Polish tag UI (#20038)
* feat: update the buttons

* chore: update the buttons to use c-btn

* feat: update the following tag to be crayons-btn crayons-btn--outlined

* feat: update the gap between the buttons

* feat: style for moile

* Empty commit
2023-09-07 10:32:53 +02:00
Rajat Talesra
cd0f53e413
Move navigation to bottom in onboarding (#20010)
* Shifted navigation to bottom in onboarding

* Padding changes
2023-08-30 23:22:41 +05:30
Ridhwana
f4a9c192c0
Follow and Hidden Buttons on /tags page (#20005) 2023-08-30 14:29:00 +02:00
Ben Halpern
bba033ea2a
Fix content layout shift with mod-actions-menu-btn (#19991) 2023-08-25 10:52:28 -04:00
Ridhwana
5266dd1afb
Showing and hiding tags in the Following and Hidden Tags Pages (#19954)
* feat: remove updated weights

* feat: click on following on the following tags page

* feat: add and listen for the following button click

* fix: dropdowns

* feat: handle hide button click

* feat: update the nav link for following tags

* feat: handel the 'unhide button' on the hidden tags page

* feat: add the styling for the buttons

* feat: add localization

* feat: remove the brand from the card

* feat: add some styling to the page

* feat: init scrolling

* chore: update the name of the file

* feat: abstract out the comment fetch code

* fix: close the attribute

* feta: make some adjustments to where the tag adn the follow show up

* rename class from plural to singular

* feat: updae the comment

* feat: add a mutation observer to initialize the dropdown

* test: follow_craete

* chore: remove irrelevant test

* feat: update the cypress seeds

* feat: update the cypress seeds

* spec: write soem initial tests for the following tags page

* spec: update the unfollow cypress spec

* spec: update the hide cypress spec

* spec: update the posts published spec

* note to add test for pagination

* spec: hidden tags page

* feat: remove aria pressed attributes

* fix: ordering by explicit points gets the page params confused and returns the incorrect and not all results on pagination

* fix: use explicit points

* feat: remove the message at the top of the following and hidden tags page

* chore: remove comment and rather add it to the PR itself

* refactor: do all the actions on success

* feat: refactor the dashboard tag file

* refactor: only show the tagId and followId dataset attributes on the dashboard__tag__container

* feat: disconnect the observer

* chore: add some documentation

* feat: add fr localization

* chore: empty line

* fix: update the dashboardTags page to first declare the observer"
"
"

* fix: update the rails test

* Empty commit

* fix: because I added more tags, the dropdown was longre and covering the body of the editor hence it could not find the text, so I've escaped after selecting my tags
2023-08-25 14:49:39 +02:00
Rajat Talesra
992ced1908
Tag moderation UI changes (#19906)
* Basic add remove functionality with few tests

* Updated cypress test and added more unit tests

* Rename display ads vars in the views (#19877)

* Renamed display_ads vars to billboards

* Rename local vars in the feed view

* Renamed display-ad in the comment

Co-authored-by: Rajat Talesra <rajattalesra4914@gmail.com>

* Renamed variables in the views

---------

Co-authored-by: Rajat Talesra <rajattalesra4914@gmail.com>

* Update js-routes to version 2.2.7 (#19883)

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

* add field for billboard target geolocations, with unit and e2e tests (#19855)

Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
Co-authored-by: Duke Greene <dukegreene@gmail.com>
Co-authored-by: PJ <pj@forem.com>
Co-authored-by: Anna Buianova <lightallloy@gmail.com>
Co-authored-by: Mac Siri <mac@forem.com>
Co-authored-by: zhangted <tedcbook@gmail.com>
Co-authored-by: Josh Klar <jklar@forem.com>

* Added autocomplete value off (#19882)

* Bust cache of organization page when new member is added (#19861)

* Remove unused freezeScrolling (#19808)

* Remove unused freezeScrolling

* chore: try see if this helps to skip the flakey test that wasn't being skipped

* chore: try see if this helps to skip the flakey test that wasn't being skipped

* oops: revert the gemfile changes

---------

Co-authored-by: Mai Irie <mai@forem.com>
Co-authored-by: Mac Siri <mac@forem.com>
Co-authored-by: Ridhwana <ridhwana.khan16@gmail.com>

* ci: Allow workflow_dispatch runs to log in to GHCR. (#19885)

* ci: Fix base image builder... the right way... (#19889)

* Update postcss to version 8.4.27 (#19888)

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

* Replace uses of toBeDefined with toExist  (#19862)

* Replaced toBeDefined with toExist

* Revert db changes

* Rename display ads to billboards: css and js code (#19887)

* Renamed js vars/css names

* Renamed display_ads to billboards in js functions, variables, components

* [ruby] Update sidekiq-unique-jobs 7.1.29 → 7.1.30 (patch) (#19902)

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

* Update oj to version 3.15.1 (#19901)

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

* Updated failing cypress test

* Removed commented code

* Attempt at fixing tests

* Fixed failing tests

* Added more tests

* Basic color and design changes part -1

* Disable/Enable buttons correctly

* Various design updates in Tag adjustement mod UI

* I18N and documentation

* Updated mod panel

* Fixed mod related cypress tests

* Minor design fixes

* Dark mode designs

* Test update

* Mod UI with some bugs

* Updated/simplified code fully-working

* Updated tests

* Added more tests

* Accessibility improvements

* hr line code fix

* Close mod icon bug fix

* Nit fixes

* Design fixes as suggested by Anuj.

* Design fixes

* Dark mode file usage

* Design fixes

* Nit fixes

---------

Co-authored-by: Anna Buianova <lightallloy@gmail.com>
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
Co-authored-by: Duke Greene <dukegreene@gmail.com>
Co-authored-by: PJ <pj@forem.com>
Co-authored-by: Mac Siri <mac@forem.com>
Co-authored-by: zhangted <tedcbook@gmail.com>
Co-authored-by: Josh Klar <jklar@forem.com>
Co-authored-by: Joshua Wehner <joshua@forem.com>
Co-authored-by: Mai Irie <mai@forem.com>
Co-authored-by: Ridhwana <ridhwana.khan16@gmail.com>
2023-08-24 00:31:21 +05:30
Ben Halpern
1463d8c98a
Do not crop with imagga if never_imagga is passed (#19975)
* Do not crop with imagga if never_imagga is passed

* Clean up code styles
2023-08-22 11:52:02 -04:00
Ben Halpern
ec7adf56fe
Allow admins to set cover image height configs (#19936)
* Initial basic work

* Bulk of related work, including find/replace on the inputs

* Adjust some tests

* Adjust some specs

* Fix a few more tests

* Clean up tests

* Adjust tests

* Test fiddle

* Adjust crop back to be a param

* Update tests

* Set proper defaults

* Fix some styling

* Adjust enrichment logic and tests

* Adjust form JS

* Update test snapshot

* Clean up formatting

* Fix spec name

* Adjust some css and defaults

* Adjust translation for image provider options

* Switch from fill to fill-down

* Proper fallback image

* Fix tests

* Update app/services/images/optimizer.rb

Co-authored-by: Mac Siri <mac@forem.com>

---------

Co-authored-by: Mac Siri <mac@forem.com>
2023-08-21 13:25:16 -04:00
Ben Halpern
5717ab7396
Ensure pageviews trigger on internal navigation (#19943) 2023-08-15 12:11:40 -04:00
Ridhwana
edd4434e3e
Fix: Billboard dropdown scrolling within the billboard (#19806) 2023-08-11 14:55:02 +02:00
Anna Buianova
89b3b8127e
Rename display ads to billboards: css and js code (#19887)
* Renamed js vars/css names

* Renamed display_ads to billboards in js functions, variables, components
2023-08-04 17:30:59 +03:00