Commit graph

12775 commits

Author SHA1 Message Date
Josh Klar
f0346d811f
ruby: Upgrade to v3.1.4 (pt. 1, base image only) (#19871)
In #19776 we discovered that basing both the base container *and* the
app container off of `.ruby-version` causes a chicken-and-egg problem
wherein upgrading Ruby versions requires a few stop-and-gos. Let's make
those stops reviewable as separate chunks instead: use a new
`.ruby-version-next` for building base images, not the `.ruby-version`,
thus allowing GitHub Actions to fire off an automated build (which, when
complete, we can take the SHA sum from and use it to open a second PR
updating the app image to use it, and `.ruby-version` can be updated to
match `.ruby-version-next`).
2023-08-01 17:46:56 -07:00
Mac Siri
fd7e28b658
Reorganize devDependencies & revert strong_migrations (#19870) 2023-08-01 16:26:04 -04:00
Anna Buianova
5ea3490b6e
Renamed leftover @hero_display_ad => @hero_billboard (#19874) 2023-08-01 21:15:05 +03:00
zhangted
beb2800959
move initializeSettings to webpack (#19737)
* move initializeSettings to webpack + add tests

* add initializeSettings to InstantClick change block

* dont use classes, use modules

---------

Co-authored-by: PJ <pj@forem.com>
2023-08-01 13:09:50 +01:00
Mac Siri
22569b37c8
Exclude Page from ReservedWords checks (#19853) 2023-07-31 11:30:37 -04:00
Anna Buianova
058fd17b58
Renamed display_ad variables to billboard (#19851)
* Renamed display ad variables and constants

* Renamed display_ads associations

* Fixed variable name in display ads

* Renamed display_ads variables in views

* Fixed admin billboard view spec

* Fixed variable name in FilteredAdsQuery
2023-07-31 17:19:02 +03:00
PJ
a9fbb83be0
Add VCL snippet for client geo header (#19780)
* add VCL snippet for client geo header

* update snippet with docs + covering more edge cases
2023-07-31 14:15:40 +01:00
depfu[bot]
c869aac081
[js] Update @cypress/code-coverage 3.10.8 → 3.11.0 (minor) (#19863)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
2023-07-31 09:04:31 -04:00
depfu[bot]
5c833651f5
Update strong_migrations to version 1.6.0 (#19864)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
2023-07-31 15:06:26 +05:30
depfu[bot]
3ab926a22e
[js] Update all of babel7 7.22.5 → 7.22.9 (patch) (#19759)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
Co-authored-by: Duke Greene <dukegreene@gmail.com>
2023-07-28 13:22:56 -04:00
PJ
6e7a898828
possibly flaky test fix (#19856) 2023-07-28 19:50:19 +05:30
PJ
9754d14182
Fix intermittently broken reaction images on home feed (#19779)
* move reaction icons to base layout

* fix reactions count specs??

* also fix article specs
2023-07-27 19:48:07 +01:00
PJ
7be865b295
Feature-flagged support for filtering billboards by location (#19834)
* add migrations

* add countries gem?

* first pass at location model

* specs 

* add location to filtered ads query

* feature flag and nicer errors

* cosmetic fixes

* more tweaks (remove unnecessary index, add initializer)
2023-07-27 18:13:26 +01:00
Joshua Wehner
cf13879211
Remove feature-flag for subscribe-to-comments (#19774) 2023-07-27 10:31:55 -03:00
Duke Greene
cf7847fadb
remove onboarding background image, use gradient based on brand color (#19815)
* remove background image, rename prop to refer to color, pass primary brand color

* create helper method, send calculated gradient values into frontend props

* test new helper method and refine how color is darkened
2023-07-27 07:27:21 -04:00
Josh Klar
0b63876044
fastly_config: Soft-deprecate FastlyConfig service used only for DEV. (#19837) 2023-07-26 16:45:58 -07:00
Anna Buianova
ffb560c2a7
Rename DisplayAdEvent to BillboardEvent (#19833) 2023-07-26 13:57:02 -04:00
Helio Cola
569dbb4834
Bump to bundler 2.4.17 (#19777) 2023-07-26 13:28:26 -04:00
Anthony Nguyen
2208d2329c
Handle nil author_id on note on admin member manager view (#19830) 2023-07-26 11:22:42 -04:00
Anna Buianova
3474911d25
Rubocop fixes in spec/services (#19844) 2023-07-26 10:33:37 -04:00
Ridhwana
8c7d592b96
404 page for a suspended user with no published content (#19789)
* feat: update the logic in the user profile

* feat: remove use case for banished user

* feat: update has_no_content? to has_no_accessible_content? and write a test

* spec: write more tests

* refactor: rename variable

* refactor: small tweaks

---------

Co-authored-by: Philip How <philip.j.how@gmail.com>
2023-07-26 10:58:17 +02:00
Dhurba baral
84b2f0145a
Displays better name for Admin roles (#19819)
* Displays better name for Admin roles

* Updates translations in fr

* Capitalize role label
2023-07-25 10:46:55 -04:00
Joshua Wehner
26c1a87695
Address minimal_admin deprecation (#19807)
* minimal_admin deprecation

* Remove the deprecate and aliases
2023-07-25 10:41:15 -04:00
Anna Buianova
869f29d942
Only query unpublish_all data on a relevant tab in the member manager (#19827)
* Only query unpublish_all data on a relevant tab in the member manager

* Added specs for AuditLog::UnpublishAllsQuery
2023-07-25 17:36:45 +03:00
Jeferson S. Brito
012e625c7c
Add Preact root fragment implementation replacement for replaceNode (#19673)
* feat: add preat-root-fragment implementation of replaceNode

* refact: replace render third argument with root fragment

* chore: reorder preact root imports

* fix: root createRootFragment implementation

* chore: fix base.jsx import order

* fix: add specs for preact-root-fragment

* fix: test ci audit issues

* fix: add insert/append methods specs for root-fragment
2023-07-25 10:11:41 -04:00
depfu[bot]
4e8fc84f76
Update cld3 to version 3.6.0 (#19821)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
2023-07-25 09:52:38 -04:00
depfu[bot]
4d9a9439c6
[ruby] Update pundit 2.3.0 → 2.3.1 (patch) (#19825)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
2023-07-25 09:32:06 -04:00
Peter Frank
b39b4642fe
Add "bug" label to bug issue template (#19814)
Just adding a label
2023-07-24 14:55:04 -04:00
Duke Greene
129628b2c2
render left sidebar billboards ('display ads') asynchronously (#19797)
* render left sidebar billboards ('display ads') asynchronously

* remove request spec expectations for ads that are now rendered async

* don't set up path helper for old name style

* refactor from global to imported observeDisplayAds call

* revert refactor attempt, bad export syntax, may fast follow
2023-07-24 13:21:13 -04:00
Ridhwana
03905ce9cf
fix: move the setup dropdown to the callback because ot exists at that point (#19803) 2023-07-24 10:56:35 -04:00
Anna Buianova
963eea8126
Aliased DisplayAdEvent.display_ad_id to billboard_id (#19805)
* Aliased DisplayAdEvent.display_ad_id to billboard_id

* Allow :display_ad_id instead of :billboard_id for billboard_events in case of cache
2023-07-24 17:54:39 +03:00
depfu[bot]
c28bafccfe
[ruby] Update all development Bundler dependencies (2023-07-24) (#19820)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
2023-07-24 09:31:10 -04:00
Dhurba baral
3493c12ad2
Returns an error code when validation fails (#19734)
* Returns an error code when validation fails

Minor fixes

* Adds unit test
2023-07-24 17:01:50 +05:30
Anna Buianova
3adeb14ea0
Take :display_ad_event params as well as :billboard_event (#19810) 2023-07-21 10:53:28 -04:00
Jerin K C
6c2c1660db
Fix blank user's name (#19723) 2023-07-21 09:55:41 -04:00
Joshua Wehner
1f202c6a9a
Try to fix scrolling bug (#19801) 2023-07-21 09:42:50 -04:00
Anna Buianova
e659dbfc00
Renamed display_ad_events variables and associations (#19788)
* Renamed stuff related to display_ad_events (except the model)

* Updated user billboard_events association spec

* Fixed display_ad_event factory
2023-07-21 14:59:28 +03:00
Duke Greene
9a6f04bd37
api v1 endpoint for creating an organization (#19778)
* api v1 endpoint for creating an organization

* address failing specs, regenerate swagger docs

* remove old comment in destroy now that woreker call takes third argument

* refactor our services for profile images into images folder
2023-07-21 07:43:56 -04:00
Ridhwana
88f8a84c4e
Refactor VerifyAndDismissFlashMessage within Cypress tests (#19768)
* refactor: make verifyAndDismissFlashMessage to be more general

* feat: update the shared admin utility

* refactor: manageCredits

* refactor: manageOrganizations

* refactor: manageRoles

* refactor: manageUserOptions

* feat: remove adminUtilities

* chore: update the path name
2023-07-21 12:55:04 +02:00
depfu[bot]
0af707f026
[ruby] Update counter_culture 3.3.1 → 3.4.0 (minor) (#19782)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
2023-07-20 08:18:35 -04:00
Mac Siri
fa31b5fc60
Revert Yarn dependencies update & tighten CI settings (#19781) 2023-07-19 17:35:40 -04:00
Duke Greene
f163e2c14e
Dukegreene/moderator notifications copy change (#19775)
* update copy for moderator notifications

* use helper to display mod notification in the view

* add missing translate call
2023-07-19 14:02:39 -04:00
depfu[bot]
2205182a7e
[js] Update all development Yarn dependencies (2023-07-17) (#19693)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
2023-07-19 13:37:03 -04:00
Duke Greene
dd7e34ac53
define api v1 routes for organizations (#19681)
* define api routes and create controllers, sketch out index and create actions

* add api v1 organizations CRUD spec and docs spec, need to run swagger

* swagger dry run on admin organizations routes, typo fix in api.rb

* flesh out specs and sketch out admin actions

* move actions out of concerns/include pattern and into v1 inline

* remove private constant call

* add v1 accept header to doc spec, fix syntax in a before block

* update controllers to address failing specs

* simplify controller and clarify route config

* flesh out tests for errors

* fix long line

* add missing commas

* return username show route to v0 concern controller

* create separate show route and action name, remove nesting from create/update params requirement

* clean up syntax in controller params and update show path in specs; move routes

* fix up syntax in params permit

* create organization in index spec

* one more syntax tweak for org params

* refactoring to one show route that handles username or id

* tweak spec syntax to expect the right array

* tweak controller and specs, simplify routing to show

* remove create route, action, and specs from this branch

* add clarifying comment in show controller action

* add explicit not found return to show route

* fix controller formatting causing 404 errors

* remove comment, update specs

* remove commment and fix id show response and specs

* fix show route and request spec for username param

* update unauthorized user specs to use put for now instead of post, regenerate swagger docs

* adjust update 422 spec to break org validity

* fix admin update spec, rerun swagger

* reorganiza controller actions, update specs, ensure authorized update and delete

* improve spec, handle finding one org more gracefully, delete via worker

* copy routes into api namespace instead of moving them from general namespace

* update param in v0 show route to fit more general naming

* regenerate v1 swagger docs

* use profile image url getter in update controller response

* update swagger docs and remove unneeded comment from org' model

* configure organizations destroy action for super admins only (for now)
2023-07-19 09:51:05 -04:00
Anna Buianova
fbd2ca0453
Rename DisplayAdEventsController to BillboardEventsController (#19771) 2023-07-19 08:51:22 -04:00
depfu[bot]
d7b2f2e10f
Update preact to version 10.16.0 (#19761)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
2023-07-18 09:21:59 -04:00
Rajat Talesra
f2cc2ae774
Admin Area: Bulk assign user roles (#19733)
* Bulk Assign Roles UI

* Renaming roles to role

* Added role to multiple users without using note.

* Role note added

* Role blank key fix

* Removed roles

* typo fix

* AuditLog Added

* Optimising code

* Good standing role issue

* Good standing role issue fix

* Minor PR changes based on review

* Added cypress tests

* Added spec tests for BulkAssignRole

* Minor fixes
2023-07-18 18:41:54 +05:30
depfu[bot]
20b643ac8f
Update i18n-js to version 4.3.0 (#19760)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
2023-07-18 11:07:09 +02:00
Ben Halpern
8335a37315
Language detection with CLD3 (#19756)
* Language detection with CLD3 POC

* Update spec/models/article_spec.rb

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

* Update spec/models/article_spec.rb

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

* Update spec/models/article_spec.rb

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

* Update spec/models/article_spec.rb

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

* Update spec/models/article_spec.rb

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

* Update spec/models/article_spec.rb

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

* Update app/models/article.rb

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

* Clean up tests

* Clean up tests

* Move language detection to service

* rubocop

* Update app/services/languages/detection.rb

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

* More linting cleanup

* Remove allow_any_instance_of

* Update tests to better exercise different paths

* Fix flaky spec

* Update spec/services/languages/detection_spec.rb

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

* Update spec/models/article_spec.rb

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

* Update spec/models/article_spec.rb

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

* Update spec/models/article_spec.rb

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

* Update spec/models/article_spec.rb

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

* Update spec/services/languages/detection_spec.rb

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

* Update spec/services/languages/detection_spec.rb

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

* Update spec/services/languages/detection_spec.rb

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

* Update spec/services/languages/detection_spec.rb

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

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-17 08:57:20 -04:00
Ridhwana
77148d8687
fix: lint rule https://github.com/facebook/react/issues/14920 (#19748) 2023-07-17 12:37:32 +02:00