Commit graph

344 commits

Author SHA1 Message Date
Ben Halpern
01b55c646b
Use page social_image_url if present (#20779) 2024-03-20 10:23:30 -04:00
Ben Halpern
a30b86a025
Allow billboards to target specific pages with "fixed bottom" placement (#20748)
* Add page fixed bottom billboard

* Add page fixed bottom billboard

* Fix schema
2024-03-15 14:32:30 -04:00
Peter Frank
1cea64c7f7
Update report_abuse.en.html.erb (#20362)
Closes https://github.com/forem/forem/issues/20361
2023-11-17 13:35:13 +00:00
Christine Belzie
4337161508
docs: making updates to Editor Guide (#20258)
* feat: add mention

* fix: made some adjustments

* fix: revise bullet point

* fix: update another bullet point

---------

Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2023-10-24 14:19:30 -04:00
Ridhwana
d92e9d1af4
CTA Embed (#19440)
* feat: first pass at CTA Tag

* fix: strip_tags before using the link

* default hover

* feat: add the type of cta

* feat: add own ltag by copying the utility class

* feat: rename property to style

* feat: add style and width

* feat: add xit test

* feat: add spec for unordered options

* chore: some css

* feat: update the cta spec to remove style and width options

* feat: move billboard related code out of widgets

* fix: mobile display ad below the comments section

* feat: cta_tag strip tags  input

* feat: update the editor docs

* feat: add help text to teh liquid guide and the editor guide

* feat: fix the css styles of the CTA

* cgore: alphabetical order

* chore: move everything on one line

---------

Co-authored-by: Mac Siri <mac@forem.com>
2023-05-12 14:30:30 +02:00
yheuhtozr
ce23832988
I18nize views/pages (#18771) 2023-01-19 17:25:03 -05:00
Michael Kohl
b4afd5ee14
Disallow /ahoy/* in robots.txt (#18531) 2022-10-04 12:26:43 +02:00
Ridhwana
9361d2426f
✂️✂️✂️ Part 1: Remove Sponsorship (#18512)
* feat: remove initializeSponsorshipVisibility and related code

* feat: remove sponsorships from sidebar

* feat: remove sponsorships from the admin - route, controller, view, spec

* feat: remove the admin menu item

* feat: remove the i8n for admin sponsors controller

* feat: sponsorship decorator was not being used anywhere

* feat: sponsorship slack messenger was not being used anywhere

* feat: remove the sponsorship_headline that gets configures on the admin

* feat: remove the /sponsors page

* feat: remove renedring of single_sponsor partial and associated partials

* feat: remove the navigation link rake task for sponsors

* feat: remove sponsorship from tags

* feat: remove i8n constants used

* remove sponsor references in text to the privacy page

* feat: remove the sponsorship detail from the organization page

* feat: remove the sponsors css that was used for app/views/pages/sponsors.html.erb

* feat: remove the sponsorship i8n that was used in the slack messengers

* feat: swap out the decorators to use Article as an example

* feat: remove spec to show sponsors on home page

* feat: update the specs to use Article Decorator instead of the Sponsorship Decorator

* fix: use direct and not all

* fix: remove tests for tag sponsorship

* fix: remove organization sponsorship test

* feat: remove more i8n
2022-10-03 16:26:32 +02:00
Suzanne Aitchison
898898a46f
Add a new template to custom pages (#18212)
* add nav bar included page template

* add a test, add random seeds with new template
2022-07-27 16:56:59 +01:00
Andy Zhao
df760e7531
Remove Facebook Pixel language (#17436)
This was removed on December 20 2018 via #1380. The date corresponds with the PR.
2022-07-19 10:13:49 -04:00
Joshua Wehner
4e17649e15
Remove generated social images, except for articles#show (#18118)
* Prefer main_social_image (except on articles#show)

See https://github.com/forem/forem-internal-eng/issues/485

* Cleanup social media helpers no longer in use
2022-07-18 12:29:21 +02:00
Takuya N
b5ea75cf39
Use correct trademarks in supported embeds (#17195)
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2022-04-11 07:32:45 -06:00
Arit Amana
9c92ce03dc
Implement Loom Embed (not merging now) (#16633)
* started implementation and specs

* complete implementation and specs

* refactor

* update doc

* fix failing specs

* typos will NOT be the death of me
2022-02-22 09:05:55 -05:00
leewynne
075d1cf1e4
removed dev.to from _terms text and replaced with community_name (#16646)
Co-authored-by: leewynne <lee@fullfury.co.uk>
2022-02-21 06:51:54 -07:00
Arit Amana
846ef0cbba
Unified Embed Documentation (#16601)
* starting doc update

* ongoing

* progressing

* still updating

* continue doc update

* note about old liqtags

* add link to create bug-issue

* remove tabular list of supported embeds

* do away with the table!

* address PR review comments

* nudge Travis
2022-02-16 13:15:15 -05:00
Ridhwana
5e93d3a25e
Add a contact email address to the /admin/customization/config (#16497)
* feat: remove the default email and cobine the periodic digest and the contact email under the Email section

* refactor: rename  the email_link to contact link and use the contact_email as a default and fallback to the ForemInstance.email

* chore: alignment

* feat: use the contact_email helper

* feat: move the contact_email to the ForemInstance model

* feat: use ForemInstance.contact_email instead of the application helper method

* removed the application Helper

* feat: set the dafault on the contact_email

* fix: cypress tests

* Update app/lib/constants/settings/general.rb

Co-authored-by: Michael Kohl <me@citizen428.net>

Co-authored-by: Michael Kohl <me@citizen428.net>
2022-02-15 17:37:08 +02:00
Ben Halpern
a43d25f6fe
Add Disallow URLs to robots.txt for uselessly crawled endpoints (#16501) 2022-02-09 12:19:28 -05:00
Jamie Gaskins
a9cdb2bae2
A suspended user returns 403 instead of 500 (#16408) 2022-02-04 09:42:23 -05:00
Muhammed Cetin
13540aad86
Disallow additional pages in robots.txt (#16350)
* Unnecessary pages have been disallowed to index by search engines on robots.txt

* Unnecessary pages have been disallowed to index by search engines on robots.txt

* Necessary pages have been added back to the robots.txt.
2022-01-31 11:46:44 -05:00
Ben Halpern
1ae10d7e6f
Remove hardcoded /badge page that is DEV-only ✂️✂️✂️ (#16303)
* Remove hardcoded /badge page that is DEV-only

* Remove /badge test

* Remove scheduled job
2022-01-27 13:29:05 -05:00
Jeremy Friesen
711f1bb0cd
Let override of ToS and CoC show in onboarding (#16217)
* Let override of ToS and CoC show in onboarding

Prior to this commit any changes to the terms or code of conduct were
not reflected in the onboarding links.

With this commit, I'm leveraging a newly created method that first
checks if there's a page for the given slug.  If there is, use that
page's copy.

To test:

- Overwrite default /terms page on a Forem
- Navigate to /onboarding or sign up as a new user
- Click on Terms of Use link text
- Review Terms of Use

Closes #15296

* Adding spec around not passing a block
2022-01-20 19:45:39 -05:00
Jane ♥
d5348995c1
Finishes adding all the codepen embed options available (#16102)
Co-authored-by: JaneOri <7545075+James0x57@users.noreply.github.com>
Co-authored-by: Michael Kohl <me@citizen428.net>
2022-01-19 09:23:15 +07:00
Michael Kohl
19d6a26f7b
Update remaining Crayons icons (#16100)
Co-authored-by: Nick Taylor <nick@forem.com>
2022-01-18 13:41:04 +07:00
Jeremy Friesen
bde5064c9c
Skip google analytics when ga_tracking_id is nil (#15967)
* Skip google analytics when ga_tracking_id is nil

This commit involves short-circuiting Google Analytics calls when the
Forem has not configured a `Settings::General.ga_tracking_id`.  Note,
depending on your local `.env` file (or configured ENV variables) you
may have a `GA_TRACKING_ID` value set; I did, it was set to "Optional"
which overrode the database setting.

We set the HTML data properites in two places: [admin.html.erb][1] and
[application.html.erb][2].

In addition, I'm short-circuiting the local fallback analytics call (via
[Stacato][https://github.com/tpitale/staccato]).  My understanding of
Stacato, based on a cursory read, requires a Google Analytics Tracking
ID to work.

And last, we have a one off of javascript for Google Analytics tracking.

This closes #15962.

[1]:528bd2baa6/app/views/layouts/admin.html.erb (L31)
[2]:528bd2baa6/app/views/layouts/application.html.erb (L55)

How to test?

- Check your .env file to see if you have set GA_TRACKING_ID.  If so,
  unset it.
- Start with a fresh Forem instance.

- Open your browser and open the developer tools to inspect the Network
  activity.
- Open the homepage of your local Forem instance (http://localhost:3000)
- Filter your Network results for analytics.  You shouldn't see any.

Also, make sure you're disabling any blockers you might have as that
influences things.

* Commenting out GA_TRACKING_ID

Related to https://github.com/forem/forem/pull/15967

* Favor empty GA_TRACKING_ID env variable
2022-01-06 12:21:07 -05:00
Daniel Uber
acbdfe5df3
Change contact page to open feature requests as discussions (#15975)
fixes #15973
2022-01-06 10:03:34 -06:00
Julianna Tetreault
ac5934e63f
Conditionally Renders Links Within the COC During Creator Onboarding (#15692)
* Conditionally renders links within the COC via a creator_settings_form? method

* Updates the creator_settings_form? method within application_helper.rb

* Replaces current_user with a custom creator var

* Adds feature flag check to guard clause in application_helper.rb

* Wake up, Travis
2021-12-09 08:17:53 -07:00
Josh Soref
5324eb1477
Spelling fixes to live code (#15670)
Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
2021-12-06 12:11:25 +02:00
Julianna Tetreault
a5a1f16c70
Replaces hardcoded URL with app_url path helper in terms (#15661) 2021-12-03 06:01:39 -07:00
Supritha
785a97bd4d
Removed extra space in code of conduct (#15218) 2021-10-29 10:39:35 +07:00
Suzanne Aitchison
7a9352ba86
make default alt text 'image description' (#15063) 2021-10-13 16:37:34 +01:00
Ben Halpern
d85f07c00d
Fix legacy sitemap logic (#14926)
* Fix legacy sitemap logic

* Add aggregate failures

* Fix formatting

* Adjust robots.txt spec

* Fix index minimum to >=
2021-10-07 08:59:16 -04:00
Ben Halpern
036d75aa6e
Admin-configurable display locale (#14620)
* Admin-configurable display locale

* Add i18n-js and namespacing

* Basic tests and clean up

* A few test adjustments

* Update vendor cache

* Fix a few tests

* Fix a few tests

* Update app/views/articles/_actions.html.erb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Update app/views/articles/_comments_actions.html.erb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Update app/views/articles/_single_story.html.erb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Update app/views/articles/_single_story.html.erb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Update app/views/comments/_comment_header.html.erb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Update app/views/layouts/_sidebar_tags.html.erb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Update app/views/listings/index.html.erb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Update spec/system/homepage/user_visits_homepage_articles_spec.rb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Update spec/system/user/view_user_index_spec.rb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Alphabetical locale page

* Add activerecord custom validation error translations

* Add i18n to webpacker

* Fix a few tests

* Adjust error messages

* Add i18n-tasks

* Adjust JS to get working with jest

* Adjust the way translations are pulled in

* Adjust jest tests

* Remove time localization

* Remove superfluous public js

* Add basic tests for i18n application controller

* Remove unnecessary content

Co-authored-by: Michael Kohl <citizen428@dev.to>
2021-09-28 11:04:35 -04:00
Khadija Sidhpuri
7e91cfe760
Fix Sponsors Image display in homefeed and sponsors page. (#14494) 2021-08-23 10:05:34 -04:00
Suzanne Aitchison
75b6c8ed96
Use a single listener for all follow buttons on a page (#14246)
* create new pack, handle user follow buttons, use pack on article page, remove initializeUserFollowButts

* init all follow button types, add pack to tag index and podcast episode pages

* add pack to all relevant pages, listen for newly inserted follow buttons

* change to searchParams to remove follow button initializer calls

* fix bug with tag page, add pack to notifications page

* fix issue with follow back inner text

* update cypress specs

* run the followbuttons code on sponsors page

* remove extra foreach

* add test for follow from article sidebar

* add test for follow and unfollow tag

* add test for the tag index page

* add spec for organisation profile follow

* add tests for follow buttons in search results

* add tests for notification follows

* commit missed file - woops

* show login modal if user is logged out when they click

* add cypress tests for logged out state

* change tag button initialization

* remove data-button-initialized

* init follow buttons from base pack

* handle the case where multiple follow buttons exist on a page for the same user

* account for instantclick and userdata not being defined, lower coverage for jest

* use getInstantClick

* fix issue with set initialisation

* only listen for mutations in areas we know follow buttons may be added dynamically

* small refactors
2021-07-27 10:45:50 +01:00
Julien Maury
25715d07bd
Remove defer attribute when not needed (#14234) 2021-07-21 10:51:41 -04:00
Michael Kohl
f03d56c8c9
Remove badge notice from /settings/profile (#14019) 2021-06-22 14:27:39 -04:00
Supritha
f67e6d01d9
Fixed typo 'SlideSare' (#14011) 2021-06-21 09:39:16 +07:00
Anna Buianova
1862eb5cde
Replacing granular admin email settings with one default email (#13853)
* Replaced granular emails with the default one

* Set reply to header in emails

* Extract shared_examples from NotifyMailer

* Removed unused code

* Replaced SiteConfig with Settings::General

* Fixes related to replacing SiteConfig with Settings

* Removed duplicate line from specs
2021-05-28 12:17:08 +03:00
Dan Wallis
521bb09394
Add loading=lazy to image tags (#10888)
* Add loading=lazy to image tags

* Fix test

* Lazy-load some obvious templates

* Lazy-load more verified templates
2021-05-27 19:01:21 +02:00
Michael Kohl
6dfabd578f
Rename SiteConfig to Settings::General (#13573)
* Rename SiteConfig

* More renaming

* Update spec

* Update mandatory settings mapping

* More renaming

* e2e test fixes

* You have a rename, and you have a rename

* Spec fix

* More changes

* Temporarily disable specs

* After-merge update

* Undo rename for migration

* undo rename of DUS

* Fix DUS

* Fix merge problem

* Remove redundant DUS

* Fix specs

* Remove unused code

* Change wrong class name

* More cleanup

* Re-add missing values to constant

* Fix constant

* Fix spec

* Remove obsolete fields

* Add accidentally removed field

* Update spec

* Move methods from Settings::General to ForemInstance

* Remove unneeded model

* Change mentions of 'site config'
2021-05-21 14:45:37 +02:00
Michael Kohl
5e05f0fd92
✂✂✂ Remove shop_url from SiteConfig ✂✂✂ (#13773)
* Remove shop_url from SiteConfig

* Add data update script
2021-05-18 09:03:05 +07:00
rhymes
1901ac9573
[15 min fix] Update Publishing from RSS guide with correct instructions (#13756)
* Update Publishing from RSS guide with correct instructions

* Use colons, not arrows

* Update app/views/pages/publishing_from_rss_guide.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2021-05-13 17:00:35 +02:00
Suzanne Aitchison
cdcb3b9be3
add accessibility section to editor guide (#13727)
* add accessibility section to editor guide

* Update app/views/pages/_editor_guide_text.html.erb

Co-authored-by: Jacob Herrington <jacobherringtondeveloper@gmail.com>

Co-authored-by: Jacob Herrington <jacobherringtondeveloper@gmail.com>
2021-05-12 10:19:34 +01:00
Siddharth
f669907a8f
Updated replit url from repl.it to replit.com (#13680)
* Updated replit url from repl.it to replit.com

* Changed repl.it to replit

* Changed repl.it to replit
2021-05-07 08:00:45 -04:00
rhymes
23c661bb0a
Cleanup markup of editor guide (#13491)
* Improve HTML markup

* Implement some a11y changes

* Update app/views/pages/_v1_editor_guide_preamble.html.erb

Co-authored-by: Nick Taylor <nick@forem.com>

Co-authored-by: Nick Taylor <nick@forem.com>
2021-04-26 18:44:18 +02:00
Ridhwana
c5bcb4c021
RFC 50: fix some more hardcoded paths (#13473)
* fix: remove hardcoded paths

* fix: use path helpers

* swap href for link_to

* feat: use path helpers

* feat: use a data path to send through the path that we will be calling

* feat: pass route through to js

* dus index path

* chore: change to use path_helpers

* feat: update DUS controller

* chore: oops remove these paths
2021-04-26 17:49:54 +02:00
Suzanne Aitchison
b075c3c94a
make sure custom pages have skip link functionality (#13483) 2021-04-23 16:10:51 +01:00
Andrew Bone
c9e4227c59
crayons-notice accessibility improvements (#13273)
* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Update app/assets/javascripts/initializers/initializeCommentsPage.js.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/views/admin/badge_achievements/award.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/views/admin/broadcasts/index.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

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

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

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

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/views/pages/sponsors.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/views/shared/authentication/_email_registration_form.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/views/users/_account.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/views/shared/authentication/_initial_account_wizard.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/views/users/edit.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

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

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

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

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/views/admin/feedback_messages/_feedback_message.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

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

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/views/admin/pages/index.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/views/admin/pages/index.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/views/liquids/_user_subscription.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/views/admin/profile_fields/index.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/views/admin/tags/edit.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/views/admin/users/gdpr_delete_requests/index.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/views/articles/_actions.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/views/articles/_search.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/views/articles/show.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/views/articles/show.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/views/articles/tag_index.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/views/comments/_comment_quality_marker.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/views/comments/deleted_commentable_comment.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/views/admin/users/_notes.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/views/dashboards/following_tags.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/views/devise/invitations/edit.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/views/events/index.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/views/listings/_form.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/views/listings/edit.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/views/pages/_editor_frontmatter_help.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2021-04-14 13:32:57 +01:00
Vaidehi Joshi
f8d5bbacf6
Prevent NoMethodError when Html variant is not present, take 2 (#13283)
Fixes https://app.honeybadger.io/projects/72638/faults/78746996.
2021-04-07 11:58:35 +02:00
Vaidehi Joshi
b2ded5b889
Prevent NoMethodError when Html variant is not present (#13276)
Fixes https://app.honeybadger.io/projects/72638/faults/78731893.
2021-04-06 11:06:46 -07:00