Commit graph

89 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
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
Rajat Talesra
d1a2fd1e6c
Move footer to sidebar on home/post index page (#19784)
* Rebased with main

* Footer visibility bug fix

* Minor fix

* Added tests

* Removed initializeFooter as it is not working as expected

* JS code updated as per suggestion

* Updated cache details

* Rebased with main

* Minor fixes

* Minor fixes

* Update .github/ISSUE_TEMPLATE/-core-team-only---new-approved-feature.md

* Update .github/ISSUE_TEMPLATE/-core-team-only---new-approved-feature.md

* Update .github/ISSUE_TEMPLATE/-core-team-only---new-approved-feature.md

* Update .github/ISSUE_TEMPLATE/-core-team-only---new-approved-feature.md

* Update .github/ISSUE_TEMPLATE/-core-team-only---new-approved-feature.md

* Update .github/ISSUE_TEMPLATE/-core-team-only---new-approved-feature.md

* Removed JS logic

* Nit fix
2023-08-02 19:13:10 +05:30
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
0771a5cd2e
Load post_comments billboard asynchronously (#19285)
* feat: add a route to the async_info for display ads

* feat: load the billboard asyncronously

* feat: move the methods to the display_ads controller

* feat: handle params better

* feat: cache control headers

* feat: test fastly caching headers on display ads

* fix: surrogate key test

* feat: use safe navigation operator to handle cases where there is no article id

* fix: article id present then find the article

* feat: add a response test

* Fragment caching

* feat: update the article decorator

* feat: update cache keys for fragment

* feat: remove an empty line

* feat: add article id

* feat: bust cache

* feat: setup dropdown for billboard

* chore: add chunk to same line

* feat: add to safe params for caching

* Update app/controllers/display_ads_controller.rb

Co-authored-by: Joshua Wehner <joshua@forem.com>

* feat: remove the cache deletion

* feat: update the routes to follow a new scope

* feat: update the cache params

---------

Co-authored-by: Joshua Wehner <joshua@forem.com>
2023-04-12 18:15:15 +02:00
Rajat Talesra
fc28dfaae5
Support for new ad placement locations on home page feed (#19299)
* Basic implementation of all 3 ad placements

* UI fixes

* Dropdown bug fix

* Optimised code

* Updated tests

* Updated tes

* EOF added

* Improved a11y

* Nit fix
2023-04-12 18:47:29 +05:30
Lawrence
cfad413ca1
Display Rules for In house and Community Billboards (#19189)
* init

* Update app/queries/display_ads/filtered_ads_query.rb

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

* Update app/queries/display_ads/filtered_ads_query.rb

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

* add display ad query and update caller

* set as keyword args and add org id to callers

* Update app/queries/display_ads/filtered_ads_query.rb

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

* Update app/queries/display_ads/filtered_ads_query.rb

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

* Update app/queries/display_ads/filtered_ads_query.rb

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

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

Co-authored-by: Joshua Wehner <joshua@forem.com>

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

Co-authored-by: Joshua Wehner <joshua@forem.com>

* Update app/queries/display_ads/filtered_ads_query.rb

Spacing

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

* Update app/queries/display_ads/filtered_ads_query.rb

More spacing

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

* Update app/queries/display_ads/filtered_ads_query.rb

Co-authored-by: Joshua Wehner <joshua@forem.com>

* Update app/queries/display_ads/filtered_ads_query.rb

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

* fix some broken specs

* add updated spec for billboard rules

* missing comma

* Update spec/queries/display_ads/filtered_ads_query_spec.rb

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

* add placement in spec

* fix external spec

* cleanup

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Joshua Wehner <joshua@forem.com>
2023-03-06 14:15:14 -08: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
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
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
Ridhwana
9dee48dbc2
Add tracking for the registration flow - "Clicked on Create Account" (#18459)
* refactor: move trackEvents to a utilities folder so that it can be re-used

* feat: add a function called trackCommentClicks and use it on the articlePage

* feat: update the auth widget to take the correct properties

* feat: add create account tracking method for hamburger

* feat: add create account tracking method for sidebar left

* feat: whoops, sidebar tracking info added

* feat: add the feed card create account tracking

* feat: whoops add the id to the dom

* feat: add top nav create account tracking

* feat: create account tracking for the registration modal

* fix: callback instead of invoking + rename class

* fix: js-prepend

* feat: some showLogin event tracking

* use the tracking propert

* x - feed.jsx

* fix: oops I removed hidden

* track from the search login

* feat: add tracking for follow button

* fix: main_stories is only being called in view/articles and both are including the FollowButtons pack

* comments track

* feat: remove punc (.)

* chore: cahnge working

* chore: remove tracking-id from modal

* feat: remove ecmascript features

* refactor: rename some events

* feat: referrer page

* feat: add a secondary source for the follow buttons

* feat: remove file that is not used

* chore: rename key

* feat: use @utilities

* feat: add spec for create account clicks

* feat: add key referrer

* fix: tests

* fix: oops

* chore: add commented test

* test for tracking

* feat: update the change by 1

* feat: aggregate_failures

* feat: add data-no-instant back

* feat: try a different way of testing

* refactor: change secondary_source to referring_souce

* feat: change ahoy event test

* feat: add a version number to ahoy tracking

* feat: change the href to pathname

* feat: reply comment tracking

* fix: to be present syntax

* feat: use href instead of pathname

* chore: do not track tags and podcasts follow and remove referrer

* feat: add readinglist

* fix: remove referrer from test

* feat: fail gracefully in instances where there is no tracking data
2022-09-22 16:03:49 +02:00
Ridhwana
172dfef4bf
Add logged-in vs. logged-out targeting option for Display Ads #18390 (#18400)
* feat: add a migration that creates a display_to column on the display_ads table

* feat: add an enum for display_to

* feat/WIP: add rough draft of the field to the UI and permit it in the controller

* feat: take into account on whether an ad needs to be shown on logged in or out or both + update cache keys on sign in

* fix: if a user is not signed in then we want to display all and logged out

* fix: display_for spec in model

* feat: add some tests for display_to

* feat: style the label

* feat: show the display_to on the index page

* feat: add a seed for e2e

* chore: force true
2022-09-07 17:21:27 +02:00
Julien Maury
01c1d44e65
Fix duplicate IDs on homepage (#17092)
* fix duplicate ID main nav

* fix duplicate ID other nav headings

* fix duplicate ID reading list count

* fix duplicate attribute class

* missing case readingCountList on feed

* missing dot in query selector

* Revert "fix duplicate ID other nav headings"

This reverts commit 4f495962c47e08f0f6c41e33e897b2db176432f5.

* use generic class 'other-nav' for tests

* pass a variable 'context' to the partial nav

* pass var 'context' to partial

* fix unwanted typo in partial sidebar

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

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

* Update app/assets/javascripts/initializers/initializeReadingListIcons.js

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

* Update app/assets/javascripts/initializers/initializeReadingListIcons.js

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

* js-reading-list-count renaming

* use data-testid instead of generic classes for tests

* fix typo in specs

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2022-04-14 10:48:55 +01:00
Suzanne Aitchison
18877f6f1b
Avoid layout funkiness when non-breaking characters are used (#16782)
* Apply overflow-wrap fallback everywhere we use anywhere value

* fix some more non breaking spaces layout issues

* user with org sidebar

* comment index header
2022-03-08 10:37:52 +00:00
Michael Kohl
fd67b238ea
Use crayons_icon_tag for article views (#16071) 2022-01-14 09:33:44 +07:00
yheuhtozr
56ee3c571f
various small article elements i18n (#15023) 2021-10-15 11:06:44 +07:00
Ben Halpern
a5e8ed66ee
Fix inconsistencies with DisplayAd (#14789)
* Fix inconsistencies with DisplayAd

* Remove console log

* Fix tests

* Fix width/height being backwards

* Stub FastImage

* Update app/services/html/parser.rb

Co-authored-by: Michael Kohl <citizen428@forem.com>

* Update spec/factories/display_ads.rb

Co-authored-by: Michael Kohl <citizen428@forem.com>

* Fix display language

* Add check for img

* Change name of rotatingDisplayUnits

* Update app/helpers/display_ad_helper.rb

Co-authored-by: Michael Kohl <citizen428@forem.com>

Co-authored-by: Michael Kohl <citizen428@forem.com>
2021-09-28 09:22:07 -04: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
Anna Buianova
020912264e
Optimize loading partials as collections (#12276)
* Load events' partials  as collections

* Load /admin/articles partials as collections

* Render sponsorships partial as collection

* Render organization articles partials as collection

* Load users articles partials as collections
2021-01-18 14:18:33 +03:00
ludwiczakpawel
73e560f7a2
Updating navigation (especially mobile) (#10424)
* .

* .

* .

* .

* .

* specs

* specs

* .

* .

* merge

* moving cheese around

* layout

* .

* merge

* Fixed invalid selector for search.

* Fixed issue with URL not updating after a search.

* do things better

* kinda merge

* whoops

* whoops

* .

* .

* im a backend developer

* tooltips 1.0.1

* tooltips 1.0.1

* fix

* specs

* .

* reduce the spacing

* schema drop

* reverts

* revert

* reverts

* revert

* drop unused nav

* drop unused nav

* drop unused nav

* drop unused nav

* typos

* paths fixes

* speeding up JS

* js

* search

* Reworked initializeTopBarIcons.js

* Reworked initializeNavigation.js

* Small refactor and updated exported function API docs.

* Fixed a bug I created when refactoring the top navigation icons.

* sidebar nav links

* spec

* Fixed issues with logged out experience for top nav icons.

* Small refactor of top nav icons.

* Small refactor and added some API docs.

* Added @testing-library/dom

* Added tests for top navigation utilities.

* spec

* spec

Co-authored-by: Nick Taylor <nick@dev.to>
2020-12-08 15:59:21 +01:00
Ben Halpern
badefcabeb
Developer experience/security: Make dev/test blow up if current_user is used erroneously (#11237)
* Let dev/test blow up if current_user is used erroneously

* Fix logic

* Fix click-to-edit permissions

* Change test to check for new behavior

* linting

* Edit tests

* Change test

* Clean up implementation

* Update comment

* Fix instance vars

* Update app/controllers/concerns/caching_headers.rb

* Merge origin and add request_store gem
2020-11-12 11:54:23 -05:00
Julianna Tetreault
894de8c73f
Add following_tags_count to release_adjusted_cache_key (#11055) [deploy]
* Adds following_tags_count to release_adjusted_cache_key

* Adds following_tags_count to release_adjusted_cache_key in index.html.erb
2020-10-26 07:46:08 -06:00
Ben Halpern
45fb6504dc
[deploy] Replace HEROKU_SLUG_COMMIT with custom footprint (naive) (#9904)
* Replace HEROKU_SLUG_COMMIT with custom footprint (naive)

* Fully set RELEASE_FOOTPRINT with the expectation of setting it before launch

* Change tests

* Fix cache
2020-08-25 13:47:14 -04:00
ludwiczakpawel
877bdba176
Typography fix & Optimization (#9650)
* flare tag line height

* .

* dropdown fix + actions bar fix

* actions bar on mob

* fixing typography and improving font handling

* cleanup

* variables naming

* fonts swapping

* Makes user's default font render as SiteConfig.default_font

* Trigger checks

* Fixes missing user model specs

* Fixes storybook CI error import & logged out user font set with default

* Limits default_font config to serif, sans-serif & open-dyslexic

* Default font description text

Co-authored-by: Fernando Valverde <fdov88@gmail.com>
2020-08-18 08:05:51 -04:00
Ben Halpern
70a060b71c
[deploy] Make sidebar sponsor headline configurable (#9251)
* Make sidebar sponsor headline configurable

* Fix spec

* Fix spec typo
2020-07-14 20:18:59 -04:00
Ben Halpern
5c18f8cb67
[deploy] Only include community sponsors header if sponsors truly exist (#8942) 2020-07-01 10:37:41 -04:00
Jacob Herrington
54afa3ba91
Fix a11y issues flagged by axe on homepage (#8380)
* Fix a11y issues flagged by axe on homepage

This commit brings the number of violations found on homepage (local,
not prod) down from ~100 to ~10. It should have no serious impact on the
visual layout or design of the page.

* Change aria-labels to be consistent
2020-06-10 13:58:52 -05:00
ludwiczakpawel
39295c0bea
Layout updates (#8107)
* flare tag line height

* .

* init

* widgets

* widgets lists

* new tabs on home

* instantclick

* .

* rethinking css

* .

* .

* empty space

* campaign widget

* .

* merge

* .

* update layout

* fix sidebars on home page

* .

* fix onboarding x

* spec

* test

* test

* better handling ads

* .

* spec

* card styling

* .

* i dont know what have i broken
2020-06-04 16:12:17 +02:00
Peter Frank
9f362dee08
Swap sponsorships link (#8228)
* Update link on sponsors page

* Update "become a sponsor" link on homepage
2020-06-02 09:01:54 +02:00
Ben Halpern
b63bd98c2b
Clear sponsor cache more frequently (#7662) 2020-05-03 15:18:00 -04:00
ludwiczakpawel
d646b5e3f3
New sidebar navigation (#7212)
* new sidebar nav

* whoops

* update on reading list badge

* color

* titles + order

* themes

* remove unused images

* tests & fix

* Fix spec

* Fix specs

* sponsors update

Co-authored-by: rhymes <rhymesete@gmail.com>
2020-04-15 18:16:33 +02:00
Ridhwana
586703f9b7
[deploy] Cleanup some more dev.to generalisation (#7263)
* feat: rename ApplicationConfig[COMMUNITY_NAME] to just community_name

* refactor: use the method name defined in the file

* chore: use community name on the information template

* refactor: move the social media links into a partial

* chore: reuse the css

* chore: update the partners page

* chore: make the code-of conduct DEV related vars dynamic

* feat: update the code of conduct

* feat: first pass at the editor guide

* feat: update more templates (maybe this one should go?)

* feat: update the tags page

* feat: set configurable email

* feat: article urls updated to be dynamic

* feat: add comment

* feat: update rss guide to use local dev

* chore: revert hashtag as it will come from https://github.com/thepracticaldev/dev.to/issues/7254

* chore: string interpolation

* feat: add the code for the svg resizing on the information page.
2020-04-14 21:30:13 -04:00
Ridhwana
e626cfa933
[deploy] Split out social media options (Important: post deployment task to be run) (#7173)
* feat: define the different social media handles

* feat: dynamically render all the social media fields

* feat: ensure that the social media handles are permitter and dealt in a separate path from the rest

* test: update  social_networks_handle to social_media_handles

* feat: update the sidebar to use different social media

* feat: update the twitter:site meta handle to be  SiteConfig.social_media_handles["twitter"]

* feat: update the a links to tweets

* feat: make the links dynamic and only show those that there is a value for

* refactor: make @ThePracticalDev dynamic

* refactor: make @ThePracticalDev dynamic

* feat: add dynamic social media handles

* chore: rename values

* chore: remove extra social handles

* chore: some spacing

* chore: remove lines

* rafector: user rails-settings-cached type: :hash to set the type and the defaults

* feat: use nil and blank instead of "" and empty

* chore: move the social media handles into the right box

* refactor: rearrange model placement based on the UI

* chore: code climate

* refactor: comments from PR

* chore: rename the ff

* chore: amended twitter username

* chore: add a temporary rake task

* feat: update names

* chore: why am i using the old syntax :(

* chore: revert dynamic erb variable in offline.html
2020-04-09 19:51:11 +02:00
Ridhwana
e74890680a
Generalize meta content and copyright year (#6887)
* chore: remove the description

* feat: change the meta og:site_name property from The Practical DEV to The <COMMUNITY_NAME> Community consistently

* refactor: change the canonical link to be more dynamic using the <%= ApplicationConfig["APP_PROTOCOL"] %><%= ApplicationConfig["APP_DOMAIN"] %>

* refactor: update the path to be dynamic

* refactor: change some other meta properties to be dynamic

* refactor: update the index

* refactor: update the sitename to just read <%= ApplicationConfig["COMMUNITY_NAME"] %> Community

* feat: copyright year should be dynamic

* feat: change the meta og:url content to be dynamic by using <%= ApplicationConfig["APP_PROTOCOL"] %><%= ApplicationConfig["APP_DOMAIN"] %> for the former part of the url

* feat: space

* refactor: move the copyright notice to a helper

* refactor: use the community_qualified_name helper!

* refactor: start year is already a string

* refactor: use app url helper instead of <%= ApplicationConfig["APP_PROTOCOL"] %><%= ApplicationConfig["APP_DOMAIN"] %> everywhere

* chore:oops

* refactor: Change  <meta name="twitter:image:src" content="http://i.imgur.com/B4JNl1w.png"> to `<meta name="twitter:image:src" content="<%= SiteConfig.main_social_image %>">` consistently.

* refactor: Replace  `<meta property="og:image" content="http://i.imgur.com/B4JNl1w.png" />` with `  <meta property="og:image" content="<%= SiteConfig.main_social_image %>" />`

* chore: update some other meta's

* feat: replace 'The Practical DEV' with 'DEV Community' and

* test: remove The :)

* test: copyright_notice

* fix: syntax error

* feat: name of community

* refactor: use app url

* fix: template strings

* fix: tag

* feat: update the app url parameters

* feat: add a community_name helper so we don't have to refer to an environment variable in the templates

* feat: take into account the case when the start year is a blank string

* feat: single quotes to double quotes

* test: add a test for the #community_name

* chore: update or codeclimate

* chore: amend the community helper

* refactor: use the community_name helper in here

* feat: update ApplicationConfig["COMMUNITY_NAME"]  with community_name

* fix: Time.current.year needs to be a string :(

* chore: extra space

* chore: change to use community_qualified_name
2020-03-31 16:15:57 +02:00
ludwiczakpawel
61b913e5e8
Replacing theme variables (#6682)
* add tons of colors

* add tons of colors

* moving cheese around and prepping for new theming system

* documenting

* .

* moving theme code to own files

* replacing some variables

* whitespaces

* replacing another batch of variables

* get rid of another variable

* replace loading animation variable with one-fits-all-sizes

* get rid of theme-anchor-color

* remove code colors variables

* another batch of variables replaced

* mostly bringing in variables for haxor theme

* remove invert-image variable for chat

* remove another inver-image variable

* forgot to remove reaction-background variable

* remove border variable

* series

* .

* remove another variable

* remove another variable..

* another batch of variables

* and more...

* drop comments

* Update approval file for tweet

Co-authored-by: rhymes <rhymesete@gmail.com>
Co-authored-by: benhalpern <bendhalpern@gmail.com>
2020-03-24 15:05:35 +01:00
Michael Kohl
555cb2d69e
Consistently use cache_key_heroku_slug (#6495) 2020-03-06 16:35:35 -05:00
ludwiczakpawel
66e0637e4c
CSS cleanups (#6274) [deploy]
* move kbd where it should be

* initial cleanup

* do we even need that?

* sponsorships

* cleanups on articles.scss mostly

* initial cleanups to scaffolds

* moving cheese around

* color variables, variables cleanups

* adding spacing units

* variables cleanup

* adding topbar height variable

* a bit of top-bar refactor

* a bit of top-bar refactor

* a bit of top-bar refactor

* simpler animation

* top bar search and responsivness

* loggged out version

* remove unnecessary comment

* fixing svg icons

* search cleanup

* top bar cleanups

* .

* dropdown in header

* removing fill from svgs to make them work in other themes

* remove test element

* topbar icons recreated

* Whoops

* variables naming

* .

* whoops
2020-02-28 07:39:09 -06:00
ludwiczakpawel
6d2c63026c
Homepage Improvements, round II (#6202) [deploy]
* remove border from ad and fix cut-off

* improving ellipsis for tags

* improving ellipsis for tags

* fixing underline between each tag on hover

* user avatars alignment in left sidebar

* test commit

* reverting test

* test commit

* reverting test

* index unassigned

* user suggestions in right sidebar on tag page, fixes

* improving widgets a little

* line height for category

* Update tests

Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2020-02-20 17:12:56 -05:00
ludwiczakpawel
a77dfefc2a
Homepage UI Improvements (#5890) [deploy]
* de-emphasizing right sidebar: mostly colors & spacing

* adding a bit more love to typography in sidebar

* changing language on LISTINGS widget header

* hiding profile widget from left sidebar

* cards shadow now looks like a bit less random and annoying

* actually doing the same with all shadows! YOLO

* some spacing cleanups around sidebars

* this time some typography love

* im committing but not really sure what exactly

* adding a bit more love to feed card

* looks like i broke some other views.. time to fix em all

* cleaning up typography a bit more

* .

* separating empty search results styling

* created a card styling mixing to reduce some code.. also moved cheese around a bit

* several more cleanups

* improving responsiveness

* i fixed what i broke

* more cleanups

* org badge

* .

* ...

* responsiveness

* .

* some adjustments

* bring back profile card

* tiny logo adjustment

* bunch of further refainments

* typography

* a bit more refainments

* whoops

* bringing back CTAs styling to loggedout sidebar

* fixes to left tags in left sidebar after merge

* buttons fix

* fixing border-color

* Update app/assets/stylesheets/articles.scss

Typo!

Co-Authored-By: Nick Taylor <nick@iamdeveloper.com>

* .

* css cleanup + double border on article page

* removing unnecessary comments

* get rid of loading glitch

* static vs fixed header

* Update system specs

* Update client test snapshots

* Further modify homepage specs

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2020-02-19 11:24:44 -05:00
Nick Taylor
0119918237
Homepage left side bar tags followed (#5918) [deploy]
* SASS formatting in action.

* Unnested .sidebar-nav-element in SASS

* Created the <TagsFollowed /> component.

* Mini refactor.

* Left side bar uses <TagsFollowed /> component now.

* Accomodating InstantClick

* Small refactor and added some comments.

* The homepage webpacker pack only needs to be loaded once.

* Added tests for the <TagsFollowed /> component.

* Modified the receive InstantClick callback as per their docs.

* Reverted the data-no-instant on he homepage bundle. It seems to cause issues in certain scenarios.

* Just some tweaks to <TagsFollowed /> component.

* Removed CSS for general img tag in context of sidebar as it does not appear to be used.

* Fixed copy paste error from JSX to HTML.

* Fixed <img /> styles for arbitrary sponsorship widget.

* Fixed a regression that a Capybara test caught.

* Fixed user followed tags on home page tests.

* Fixed logic for loading user data on homepage.
2020-02-11 12:09:23 -05:00
rhymes
a95877e8ff
Use cleverer patterns to fetch/iterate AR objects when checking presence (#5833) [deploy] 2020-02-05 08:21:20 -05:00
Michael Kohl
728a05c476 Move from env variables to SiteConfig (#5385) [deploy]
* Move from env variables to SiteConfig

Related to #5384

This PR only deals with the first remaining part outlined in the issue, starting to use existing SiteConfig keys instead of the env variables.

* Restore Envfile to original version for now
2020-01-07 16:36:24 -05:00
Molly Struve
1979ad13f3 replace DEPLOYMENT_SIGNATURE with HEROKU_SLUG_COMMIT to bust caches on deploy (#4950) [deploy] 2019-12-02 12:51:04 -05:00
Ben Halpern
5d380f93cb
Track success of DEV Shop ads (#3589)
* Add basic display ad event tracking

* Finalize client-side eventlistening functionality
2019-07-31 13:44:47 -04:00
Andy Zhao
e604bf729c Use each instead of find_each to preserve order (#3519) 2019-07-22 11:24:57 -04:00
rhymes
cecd1db070 Sponsorship: business logic (step 2) (#3440)
* Add Sponsorship model

* Add Sponsorship to admin

* Add correct relationships between models

* Add temporary script to migrate sponsorship data

* Use constants for enums

* Use Sponsorship model in PartnershipsController

* Use Sponsorship in the views

* Validate sponsorship levels and tag combos

* Replace the rest of the sponsorship code to use Sponsorship
2019-07-10 16:40:56 -04:00
Ben Halpern
4ebfcd8bc0
Self-serve sponsorship options (#3371)
* WIP - Initial work on sponsorship landing page

* Add initial partnership page
2019-07-03 12:04:03 -04:00
Ben Halpern
456931f208
Further generalize pages and site Twitter handle (#3177)
* Further generalize pages and site Twitter handle

* Add footer mod change

* Remove giveaways dead code
2019-06-16 00:59:11 -04:00
Ben Halpern
b645942dd2
Add loading='lazy' attribute to some images (#2776) 2019-05-09 16:37:06 -04:00
Ben Halpern
f0663d83ca
Add nightmode image (#2640) 2019-05-01 15:14:18 -04:00