* Adds landing_page checkbox for Landing Page
* Adds landing_page to page_params in Admin::Pages::Controller
* Adds landing_page to admin_manages_pages and admin_creates_pages specs
* Adjusts copy for Landing Page in pages/_form.html.erb
* Places #post_a_job before #privacy in Pages::Controller
- Ensures that all page-related methods are properly
alphabetized
* Alphabetizes remaining out-of-order page-related methods
- Ensures that all page-related methods within the
Pages::Controller are in alphabetical order, following
the order of the other methods
* Adds landing_page check to ApplicationController#verify_private_forem
* Adds a single_landing_page validation to the Page model
* Adds a lock.svg to /images and uses it in the pages index
* Adjusts buttons and checkboxes to use crayons class in pages partial
* Ensures that pages/_form.html.erb destroy button uses crayons
* Adds a landing_page validation-related test to page_spec.rb
* Updates #single_landing_page validation and error message
* WIP: Adds JS modal upon landing_page error in pages/_form.html.erb
* Adds a working modal upon error in pages/_form.html.erb
- Removes redundant #single_landing_page validation from Page
- Adds #has_a_landing_page? in place of #single_landing_page
- Conditionally renders the landing_page checkbox in _form.html.erb
- Adds styles to locked screen/landing page modal
- Adds copy to locked screen/landing page modal
- Beings adding buttons to overwrite current landing_page
* Updates the data-modal-selectors and ids in pages/_form.html.erb
* Uses #landing_page_path within pages/_form.html.erb modal
- Adds a link_to to link to the current landing page in the modal
- Adds styles to buttons and link_to in modal
* Adds back single_landing_page validation to Page.rb
* Reverts changes and updates methods within Page.rb
- Reverts changes to #single_landing_page
- Refactors #has_a_landing_page? and #landing_page_path
- Updates div id in pages/_form.html.erb
* Adjusts #single_landing_page error message slightly
* Adds a test for landing_pages in stories_index_spec.rb
* Adds an overwrite attribute to Pages for the modal in _form
- Fixes anonymous spelling
* Refactors pages/_form.html.erb and cleans up spelling
* Adds a safe operator to landing_page.path in Page
- Adjusts the placement of the hidden value in pages/_form.html.erb
* Updates styling for Current Locked Screen link
* Adds the ability to overwrite an active landing page on click
- Adds Admin::PagesController#update_and_overwrite and refactors
AdminPages::Controller#udpate to work with new method
- Adds a remote attribute, overwrite, to Admin::PagesController
via a hidden_field in pages/_form.html.erb and an attr_accessor in
the Page model
- Adds a toggleOverwrite() function to pages/_form.html.erb to
toggle the (soon to be hidden) overwrite checkbox in the form --
the checkbox is toggled on button click
* Adds a guard clause to #landing_page_path in Page.rb
* Adds a safe naviagtor to Admin::PagesController#update_and_overwrite_landing_page
* Adds a type and return to Overwrite button to prevent submit
* Adds a hidden class to the overwrite checkbox field in _form.html.erb
- Hides the overwrite checkbox since it is only used to overwrite
the landing_page boolean on click of the "Overwrite current locked
screen" button
* Adds Admin::PagesController#create_and_overwrite and removes hidden class
* Adds landing page-related tests to admin_manages_pages_spec.rb
* Remove messy commented out code and place it in GH comment instead
* PR Review Feedback: Renames remote attr, defines class methods, updates views
- Renames remote attribute to overwrite_landing_page
- Updates all necessary views, methods, etc. w/ new attr
- Defines two class methods to make code more extensible
- Updates all necessary views, methods, etc. w/ new methods
* Remove unnecessary comments and revert changes to ternary in _form.html.erb
* Adjustments for accessibility within _form and index
- Adds a descriptive id to <p> in _form.html.erb
- Adds an ariadescribedby field to _form.html.erb
- Adjusts title within index.html.erb
* Refactors landing_page-related code per PR review requests
- Adds a landing_page_modal_controller.js that handles
and further customizes the dismiss and overwrite button, and
handles opening the modal
- Adds a _landing_page_modal partial to extract modal-specific
html outside of the _form.html.erb partial
- Refactors _form.html.erb to account for the _landing_page_modal
partial and the landing_page_modal_controller.js
- Refactors the overwrite checkbox to be a hidden_field rather than
a hidden checkbox and removes existing hidden_field to accomodate it
- Loads the @landing_page within Admin::PagesController#edit for
use by the _landing_page_modal.html.erb partial
- Refactors Page#single_landing_page to be more readable
- Removes useless JS from _form.html.erb
* Removes #landing_page_exists? class method since it isnt used now
* Uses the #landing_page class method within ApplicationController
* Removes pending status from test in admin_manages_pages_spec.rb
* Adds an e2e test for landing pages and adds to seeds_e2e
- Adds a landingPage.spec.js to test landing pages
- Adds a Page to seeds_e2e.rb for landingPage.spec.js
* Removes references to articles from e2e test and adds clickable link
* Adds another Page to seeds_e2e.rb and updates link names in test
* Adds the Current Locked Screen title to modal and opens in new link
* Renames Dismiss to Cancel and updates all necessary code
* Adjusts landingPage.spec.js
* check for existing landing page before showing modal
* Update Cypress tests and fix bug in LandingPageModalController
* Apply suggestions from code review
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* Orders Pages by created_at desc in /admin/pages/index.html.erb for consistency
* Targets specific edit button in landingPage.spec.js
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: rhymes <github@rhymes.dev>
* feat: allow a page to override the code_of_conduct, terms and privacy page
* feat: let privacy policy also use a partial for its contents like coc and terms
* feat: show the defaults or the pages
* specs: add tests for the overrides
* feat: update some styles and make use crayons buttons
* fix: update order of test items
* spec: fix
* reactor: move this whole section in the if
* feat: updates
* fix: code climate + travis
* more codeeclimate
When redirecting to the welcome, challenge and checkin articles,
breakman was complaining about a potential open redirect vulnerability
due to the fact that the redirect URL comes from a string stored in the
database.
This commit silences breakman by explicitly parsing the database article
path (via `URI.parse`) and explicitly stating that only the `path`
portion of the URI is to be used (== in an unlikely event of an absolute
URI pops up from the db record, the user-agent will still be instructed
to be redirected to a page under the app's domain).
* Add 'feature_flag' field to pages table, form
* Add 'exist?' to FeatureFlag
* Test for feature flag when loading custom pages
* Refactor FeatureFlag.enabled? to check both boolean and user gates
* Ugly test fixes
* PR feedback and refactoring
* PR refactor: don't require database table!
* feat: add placeholders for some routes
* about_listings_url
* feat: tag-moderation
* chore: about_listings_url test
* chore: use post a job url
* chore: add pages methods
* chore: just reordered stuff
* oops forgot to save - oh man
* chore: change to single quotes
* chore: hopefully retrigger cc
* chore: update tests
* feat: PR suggestions:)
* chore: spec
* add tons of colors
* add tons of colors
* moving cheese around and prepping for new theming system
* documenting
* .
* moving theme code to own files
* whitespaces
* 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
* introducing variables & buttons component
* more variables
* Whoops
* init modal component
* init modal component
* init form component
* form component
* .
* variables naming
* .
* tiny cleanups
* formatting
* whoops
* Test
* component avatars
* components page + fixes
* indicators
* init boxes
* boxes
* im an idiot
* radios, checkboxes
* maybe im smart
* whoops. i am dumb and blind
* checkboxes and radios
* better documentation, code examples, avatars rewritten
* notices, modals, dropdowns
* .
* oh damn you
* checkboxes & radios
* forms
* generating tailwind classes
* i broke things
* spacing units
* typography, spacing
* positioning
* overflow
* .
* getting rid of cards for now
* formatting
* adding reset to global styles to avoid jumping layout
* change url for crayons test page to not be top-level
* additional style for indicators, colors, navigation, grid
* tabs
* backgrounds
* flexbox
* .
* .
* im not sure why schema change was here...
* same about this one...
* this file shouldnt be in my commit either
* adding comments and mentally dropping IE10 support :D
* .
* referencing boxes.scss file
* new line
* get rid of font-size from body
Co-authored-by: rhymes <rhymesete@gmail.com>
* 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
* set up refactored onboarding
* create onboarding page
* add in first slide and change slide functionality
* fix test suite
* profile refactor
* profile refactor
* refactor to api
* add checkbox fields
* add checkbox fields
* remove puts
* add basic css
* add styling
* add redirect
* hide back and next at first and last slides
* test refactored onboarding
* test refactored onboarding
* remove article edits
* Fix schema
* Add deleted file back in
* Add default value for checked_t&c column
* Adjust HTML structure to keep nav buttons in place
* Fix ESLint issues on Onboarding.jsx file
* Handling for undefined or empty followedTags on getUserTags
* Fix codeclimate issues
* Fix codeclimate issues
* Fix more codeclimate issues
* Fix more codeclimate issues
* Update Onboarding snapshots
* Uncheck the CoC and T&C checkboxes on render
* Update snapshots
* Return false instead of raising error
* Update spec to use new onboarding
* Redirect to onboarding if haven't seen it yet
* Prevent redirect to onboarding from /signout_confirm
* Use assign_attributes instead of saving twice
* Move COC and T&C checkbox page to second slide
* Add 'go back to original page' functionality
* Reuse ready prototype logic
* Keep track of the last visited onboarding page
* Fix email subscription bug
* Fix overflow issue for tags page
* Remove height to prevent page container scrolling
* Check for CoC and T&C for displaying onboarding
* Add InstantClick redirect and preserve referrer in client
* Fix async update + check by using localStorage
* Turn off onboarding for tests
* Finalize design for onboarding
* Finalize design for onboarding
* Make bulk follows during onboarding
* Fix bulk follow test
* Use published scope for articles
* Fix variable name
* The sequencing in the union query matters
* Fix spec
* Restore a published: true condition
* This test is actually misleading due to the union
* Revert this change, not sure why it's not a relation
* Fix useless diff