* Add view test for change submit button
Expect a quoted string for the button values.
* Quote button text in calls to changeSubmitButton
This fixes a parse error (locally now I get an error about not having
a stripe publishing id, which is expected).
* Dark Theme preference is a user setting and not delegated
Resolves NoMethodError
* Add a view spec
This ensures the /credits/purchase page is rendered
* Test both styles based on user setting
Add an actual expectation to the view test
Time Zones are political things, and move. The timezone database knows
this, and correctly interprets times as they would have been at the
time.
For example, when the Time zone is Africa/Monrovia, the offset now is
0, but the offset in 1970 was -44.5 minutes, so Time.zone.at(0) is Dec
31st, 1969, 23:15:30 and not Jan 1st, 1970 00:00:00.
Prevent this spec from randomly failing based on Zonebie's selected
timezone by comparing the offset _then_ against UTC, and predicting
whether the 60's have ended yet.
* Maybe this is what we need to do?
* Undo change to keyword
Use the on_html translation in the view, but pass 'on' as a keyword to
the template.
* remove unused translation
Since we only want to use views.articles.crossposted.on.html (and this is only used in the
article show template) - remove the unused 'on' key from the
translations file.
* Add a spec
Tested that this fails in main and passes on the branch
* Check that the original publication date is shown in the users local
And that it's not a <time> tag presented as text
* Correct local date selection error
If time zone was UTC (i.e. offset from utc was 0) the check for
positive? was false, I meant "non-negative" (positive or zero). Invert
the test.
* Fix rotation of images uploaded from iPhones
iPhones[1] take pictures in portrait mode with the orientation set to
90ºCCW. We noticed that uploading one of these images to a Forem
instance caused the image to be rotated when rendered. The current
theory is that Imgproxy is not maintaining the orientation value when
processing, which is solved by setting `auto_rotate: true` (serialized
into the Imgproxy URL as `ar:1`), according to the documentation.
See: 8e6585e28d/docs/generating_the_url_advanced.md (auto-rotate)
[1] This probably happens with other phones, but we discovered the issue
using an iPhone.
* Fix Imgproxy URL expectation for auto_rotate
* schema file undelete description
* feat: v1 of the script
* Flesh out remaining enums under their categories
* complete UsersSettings data update script
* complete DUS for relevant attributes in users and profiles tables
* complete DUS for users_notification_settings
* alphabetize user_settings sql file
* safeguard against null values for "null: false" settings
* Set up actual UsersSettings DUS and specs files
* fix broken DUS script
* complete specs for UsersSetting DUS
* Address QA of specs
* complete specs for users_notification_settings DUS
* fix the typos (thanks Julianna!)
* begin implementation
* still building
* add missing attribute "email_membership_newsletter"
* complete sync code (except race condition for user profile)
* complete implementation, remains tests
* Address PR review and fix Travis fails
* remove superfluous Profile.new
* fix travis fails
* feat: update the users_notification_setting attributes from the user model
* feat: use the config fonts enums to display the fonts
* feat: loop through the keys
* fix profile = nil blowing up; add specs for notification_setting model
* remove unneeded spec
* remove feed validation until after sync code removed; fixes feed_import spec failures
* remove spec associated with feed_url validation in user_setting model
* fix failing spec 😅
* add TODO
* feat: set the user settings in the user controller and use it in the customization form
* feat: move some update logic to the users settings controller thats being used from customization
* feat: show the updated values form the users_settingd and not the user instance
* Generalize redirect back to current tab
* still trying to reflect changed theme upon refresh
* customizations take effect on refresh
* remove 'with_feed' scope from user model
Co-authored-by: Jamie Gaskins <jamie@forem.com>
* start with takeover for fields previously in profiles table
* Takeover code for `publishing_from_rss` section in Settings (#13914)
* implement takeover code part 1
* implement takeover code
* fix feed fetch
* need rhymes help
* complete implementation; specs pending
* fix STUPID omission that caused so many headaches 😫
* implement profile fields pointing to users_settings 🎉
* run migrations
* implement inbox type & guidelines takeover code; specs pending (#13911)
* Point changes in notification settings to `users_notification_settings` table (#13910)
* implement takeover code; remains specs
* address PR feedback; remove related sync code
* address PR review feedback
* need help with routing and specs
* address pr review
* addressing pr review
* Treat implementation edge cases and omissions 😅
* fix uncommented comment
* fixing implementation cases
* address more PR review feedback
* fixing notifications use-cases
* refactor settings controller
* more pr review changes
* solving bugs
* fix broken onboarding
* handle eperience_level calls
* more fixes
* remove unneeded mappings
* add To-dos for quety updates
* remove done TODO
* purge done TODOs
* update notification_settings-related queries
* start fixing specs
* fixing specs
* fix notification and lrg_forem specs
* fixing broken specs
* still fixing
* fix line dif and remove reloads from user.rb
* run specs
* silence bullet and other fixes
* remove setting migration scripts and specs, fix more settings for specs
* handle missing user for article builder and fix notification specs
* fix some final controller specs and re-add incorrectly removed specs
* remove deprecated data update scripts and related workers, put travis back
* refactor admin tags mods controller, write/move specs for users notifications settings controller
* schema cleanup and other small refactors for consistency
* set field we can invalidate in spec via active record instead of at the db level
* remove I think an uneccessary hook call from subscribe_to_mailchimp_newsletter
* use bnefore_create to setup settings, please dont blow up the test suite
* mailchimp bot fix
* remove decorator in favor of single model method
Co-authored-by: Arit Amana <msarit@gmail.com>
Co-authored-by: Ridhwana <ridhwana.khan16@gmail.com>
Co-authored-by: Arit Amana <32520970+msarit@users.noreply.github.com>
Co-authored-by: Jamie Gaskins <jamie@forem.com>
* 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'
* Remove approvals fixtures
* Remove approvals initializer
* Remove approvals gem
* Remove approvals step from travis.yml
* Remove approvals from dockerignore and gitignore
* Remove references to approvals gem in docs
* Un-approvals spec/liquid_tags/codepen_tag_spec.rb
* Un-approvals spec/liquid_tags/dotnet_fiddle_tag_spec.rb
* Temporarily skip other approvals tests
We will still need to delete files in /spec/fixtures/approvals after this.
* Revert changes to dotnet_fiddle_tag_spec and codepen_tag_spec, skip those tests instead
* Temporarily skip more approvals based tests
* Attempt at moving html doc inline
* Comment out one more approvals spec
* Update dotnet fiddle and codepen liquid tag specs to not use Approvals
* Update liquid tag specs + system specs to not use Approvals
* Un-approval feed import, github issue, and tweet tag specs
* Re-add .approvals to gitignore and dockerignore
* Use Rspec compound expectations
* tooltips 1.0.1
* tooltips 1.0.1
* init
* .
* drop not needed files
* .
* init
* init
* .
* comments
* border
* missing bits
* build comment JS
* .
* .
* specs
* sloan avatar fix
* bunch of fixes
* specs and fixes
* specs
* .
* swap order of links
* contrast
* js for dropdown
* icons
* op-author
* three dots icon
* reverts
* test: capybara- make sure that we click the dropdown before clicking on edit
* permalink --> link
* tiny fixes
* aria-label on form
* proper alt on user's avatar
* aria has popup
* use UL > LI instead of DIV
* add aria-labels to dropdown items
* another aria-label
* better links: nav
* contrast
Co-authored-by: Ridhwana <ridhwana.khan16@gmail.com>
* Show canonical URL on article even after it has been updated
* Refactor canonical URL fix
* Clean up canonical URL code
* Clean up canonical URL code
* Fix incorrect formatting in admin/configs/show.html.erb
* Only render SiteConfig.tagline if it exists
* Fix typo in _signup_modal.html.erb
* Remove tagline from VerifySetupCompleted::MANDATORY_CONFIGS
* Improve signup_modal tagline specs
* Tiny fixes to address @citizen428's comments
* Add destroy organization backend
* Add view for deleting org
* Add new line to end of file
* Refactor and move destroyable? to model
* Use a nice card to distinguish the message
* Prevent organizations from being deleted if they have credits
* Fix codeclimate issues
* Remove let_it_be_changeable for flakiness
* Add community_member_description, tagline and mascot_image_url to SiteConfig
* extra space
* Add mascot_image_description field to SiteConfig
* Fix test
* No longer create identity in User factory
* Create view specs for users/edit.html.erb
* Update broken specs
* Make identities transient an explicit array
* Initial automatic cleanup with rubocop
* Fix syntax error introduced by rubocop
* Cleanup seeds file
* Cleanup lib folder
* Exclude bin folder because it contains auto generated files
* Make Rubocop a little bit more chatty
* Block length should not include comments in the count
* Cleanup config folder
* Cleanup specs
* Updated Rubocop version and generated a todo file
* Fix broken ArticlesApi spec
* Fix tests
* Restored rubocop pre-commit hook