Commit graph

5029 commits

Author SHA1 Message Date
Ben Halpern
b2a5a8488d
Simplify onboarding images and centralize config around primary/secondary logos (#12118)
* Simplify special snowflake onboarding images and center around primary/secondary logos

* Remove left and right navbar customization

* Update app/lib/constants/site_config.rb

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>

* Remove spec onboarding images

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
2021-02-08 13:26:28 -05:00
Jacob Herrington
e921952414
Fix a false positive test (#12561) 2021-02-08 11:41:12 -06:00
Tulio Calil
063a1d2850
fix dropdown-menu not closing on mobile (#12602) 2021-02-08 17:07:41 +00:00
Mac Siri
e35c455d87
Fix incorrect datetime format (#12601) 2021-02-08 10:06:20 -05:00
Anna Buianova
c5c0c4a8b5
Remove old code for feedback messages email to the reporter (#12567) 2021-02-06 10:03:38 +03:00
Nick Taylor
db7120ffae
Added E2E tests for #12585. (#12597)
* Added E2E tests for #12585.

* Added a check to ensure no error message when preview works.
2021-02-05 10:30:54 -06:00
Mac Siri
0f5da03ccb
Optimize published_articles_by_tag fetch speed (#12584) 2021-02-05 09:25:04 -05:00
Alex
d45d9be7c6
Update article published Slack notifications (#12579)
* Move Slack article published channel to SiteConfig

* Add identifying comment
2021-02-05 09:19:05 -05:00
Michael Kohl
663a855edb
Remove feed_admin_publish_permission from ignored_columns (#12592) 2021-02-05 15:06:56 +01:00
Alex
5948c6cfca
Fix bug when trying to preview a blank draft article (#12585)
* Try to fix preview bug

* Now an error is thrown client side if HTTP status isn't 200

* Now the JSON response is thrown instead of the response when preview fails.

* Linter test

Co-authored-by: Nick Taylor <nick@dev.to>
Co-authored-by: Fernando Valverde <fdov88@gmail.com>
2021-02-05 06:56:26 -06:00
Mac Siri
677203d225
Optimize StoriesController's tagged article count (#12581) 2021-02-04 15:59:46 -05:00
Andy Zhao
82b7f6519d
Delete all notifications instead of destroying (#12577)
* Delete all notifications instead of destroying

* Update spec to match new association
2021-02-04 14:41:17 -05:00
Ben Halpern
e1b1fe3ed7
Declare winner in feed_top_articles_query test (#12308)
* Declare winner in feed_top_articles_query test

* Some WIP modifications to lfe

* Fix up tests and generalize

* Fix style

* Adjust tests to handle different field test scenarios

* Remove socre_randomness tests

* Fix test to fit stub

* Update app/workers/users/record_field_test_event_worker.rb
2021-02-04 13:02:00 -05:00
ludwiczakpawel
a6fd2be9d9
/new form title fix font font-size (#12576)
* tooltips 1.0.1

* tooltips 1.0.1

* typography fix
2021-02-04 18:26:08 +01:00
Mac Siri
dfdb37971c
Add has_many: articles to Tag model (#12574) 2021-02-04 11:46:10 -05:00
Andrew Bone
9ef1534d83
Add paste image (#10212)
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com>
Co-authored-by: Nick Taylor <nick@dev.to>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2021-02-04 10:58:56 -05:00
Andy Zhao
39a63c17f2
Don't update last_buffered timestamp when creating a suggested tweet (#12537)
* Don't update last_buffered timestamp when creating a suggested tweet

* Downcase email instead to rely on index
2021-02-04 10:00:21 -05:00
Suzanne Aitchison
27f4d238cd
fix typo in nav links form (#12570) 2021-02-04 14:26:11 +00:00
João Gabriel Quaresma
b1e0dbcfa9
Add icon uploader in admin navigation links (#12388)
* Added svg image picker to navigation link form

* Added svg image picker to navigation link form

* removed unnecessary attribute at _form.html.erb

* Added targets into SvgIconUploadController

* Fixed accept file type in .erb and stimulus controller

* Fixed UI form elements
2021-02-04 13:54:59 +00:00
Ridhwana
d67a259d91
feat: update the messages on the page to use the filename instead of the id. (#12568) 2021-02-04 15:50:02 +02:00
Michael Kohl
a6c12ad986
Remove feed admin publish permission (#12483)
* Ignore feed_admin_publish_permission column

* Add migration for removing column

* Remove uses of feed_admin_publish_permission

* Remove unused view

* Fix schema.rb

* Remove extra newline
2021-02-04 13:13:35 +00:00
Meagan Waller
f854f65506
Add error message for taken username that includes value of the username (#11686) (#12501) 2021-02-04 12:02:59 +01:00
ludwiczakpawel
c816ef4a61
Text styles (#11743)
* tooltips 1.0.1

* tooltips 1.0.1

* .

* styles

* styles

* update

* nahh

* .

* adjustments

* more
2021-02-04 11:43:59 +01:00
Michael Kohl
e258e36c92
Remove language settings (#12502)
* Remove language settings

* Remove more language related code

* Remove leftover spec

* Remove language from ES mapping
2021-02-04 08:35:00 +07:00
Jacob Herrington
a1799dee01
Update verbiage around connect invitations (#12558)
The phrasing of this may reflect the code, but is a little confusing. A
user might not understand what a "joining request" is, so we should
probably just keep things simple for the time being.
2021-02-03 18:15:43 -06:00
Andy Zhao
252ffb9e45
Don't allow invites to users who are already registered (#12560)
* Don't allow invites to users who are already registered

* Check that the user count has not changed

* Ensure that the admin is still registered
2021-02-03 19:03:46 -05:00
Arit Amana
f7bd75cf32
Cypress tests for /admin/config Authentication Section (#12539)
* write tests for invite-only mode and auth-providers

* text edits

* modify specs in light of new e2e database setup

* Still working things out

* Added the admin user name to the e2e fixture data.

* Added testid for config sections.

* Fixed up test to use cypress-testing-library APIs.

* Fixed unsetting invite only mode, still need to reset it at end of test.

* Small fix for local e2e development.

* Complete all tests; generalize updateAdminConfig cypress command

* correct spec

* Complete implementation

* Address code review comments

* address code review comments #2

Co-authored-by: Nick Taylor <nick@dev.to>
2021-02-03 15:31:55 -05:00
Anna Buianova
d2d1529185
Email confirmation to abuse reports (#12557)
* Notify user that the feedback was received

* Feedback response templates

* Specs for user feedback notification
2021-02-03 22:59:50 +03:00
Rafi
ef9336f5ed
Refactoring SidebarWidget and sidebarUser (#10887)
* Refactoring suggested users

* Refactoring sidebarUser

* Returning null instead of empty fragment

* Removing useCallback

* Removing empty object

* Removing use callback

* Removing index prop

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2021-02-03 17:47:54 +00:00
Michael Kohl
60813703e8
Fix tag alias problems (#12480) 2021-02-03 11:58:59 -05:00
rhymes
cb43c9f808
Routine rubocop fixes (#12530) 2021-02-03 10:16:19 -05:00
Ridhwana
def4b95616
chore: counter should be 20 not 0 :/ (#12555) 2021-02-03 14:31:41 +02:00
Nick Taylor
4a67d66ec5
Stimulus controllers needed to be default exports. (#12543) 2021-02-02 13:35:28 -05:00
Katie Davis
7fdb16c577
remove default import for onboarding (#12541) 2021-02-02 12:46:39 -05:00
Philip Q Nguyen
2f030d8ba9
Don't redirect to /serviceworker.js on sign in. (#12479) 2021-02-02 12:33:01 -05:00
Ridhwana
530e927060
Add ability to re-run a data script from the the data update script page (#12424)
* feat: add an error column to the data update script

* feat: save the error to the error field

* feat: save the error when the script fails

* feat: show the script error on the data update script page

* chore: pass the error to mark_as_failed instead of having its own function

* refactor: use presence

* test: ensure that we test an error case of a data update script

* chore: rename errorneous to failing

* test: update some specs, working on the others

* chore: update tests now that there are two files

* chore: change error from a string to a text to allow for more char

* feat: order the data update scripts by the latest script that ran

* feat: when the script has succeeded reset error to nil

* feat: create a model function that will allow the script to be force run

* chore: oops remove the functions form the worker to the model so it can be re-used

* feat: create an endpoint that will call the model method force run when we hit the api by clicking the button

* feat: ensure that the we add an ajax call that calls the controller endpoint

* chore: remove newline

* refactor: change to a more Restful route

* refactor: use Stimulus

* fix: move the code from the model back into the worker so that we can reuse it in the controller

* feat:call the worker in the force_run action and create a show route

* feat: very first draft of using a polling mechanism on the show method after we kickoff the sidekiq job (still need to error handle)

* chore: some syntax changes and unused variables

* fix: call the method correctly with the paramters

* feat: do some error handling

* feat: error handing on the frontend

* chore: use e instead of err

* refactor: just pass the id instead of the whole script

* chore: remove the button

* fix: allow the id to be passed

* feat: handle errors better

* feat: limit the filename column width

* refactor: use a common function to set the banner error

* test: add a test fro rerun button

* test: v1 of the data update script request

* test: write some specs for the js controller

* Update app/controllers/admin/data_update_scripts_controller.rb

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

* tests: update the data worker spec

* chore: clean up the js controller and its tests

* chore: remove whitespaces

* chore: swap the functions based on the controller

* chore: updates to the UI

* chore: remove the standard error catch

* chore: update the alert and error messages

* chore: remove test for error handling for sidekiq run

Co-authored-by: Michael Kohl <me@citizen428.net>
2021-02-02 17:24:39 +02:00
Katie Davis
76453b41fb
Updates ESLint rules to error on default imports (#12512)
* add rule

* add named imports

* more missed files

* so many files
2021-02-02 10:24:03 -05:00
Nandan Kumar
30bf47a445
feature added : add-discussion-length-in-brackets #12324 (#12518)
* feature added  add-discussion-length-in-brackets #12324

* changed class name from comments-count to js-comments-count
2021-02-02 15:14:01 +00:00
Andy Zhao
d1a594e7a9
Fix typo (#12534) 2021-02-02 10:10:22 -05:00
Ridhwana
c765b94a20
Remove flakey failing test + code on Forem Instance (#12529)
* fix: remove the not available and the test for Not Available

* feat: set Forem Instance to nil
2021-02-02 15:22:34 +02:00
Michael Kohl
807efcfdd2
Ignore feed_admin_publish_permission column (#12482) 2021-02-02 13:34:36 +07:00
Katie Davis
c917f916f9
override disabled for comment like usecase (#12517) 2021-02-01 14:19:27 -05:00
rhymes
304b8f0e13
Add Message to the postgres.db_table_size dataset on Datadog (#12516) 2021-02-01 12:41:12 -05:00
Molly Struve
265c4d72c1
Optimization: Set ForemInstance.deployed_at Locally to Better Mirror Production (#12500) 2021-02-01 07:43:23 -06:00
Molly Struve
82585464b9
Bug Fix:ForemInstance.deployed_at is a String, not a datetime (#12498) 2021-01-31 14:57:48 -06:00
Molly Struve
113d195051
Bug Fix:Bust Bottom Shell Content on Admin Config Update (#12497) 2021-01-31 13:31:44 -06:00
Andrea Martz
0c0e28dd35
Add missing aria label for campaign close button (#12489) 2021-01-29 17:51:18 -05:00
Mac Siri
8e7cd6a699
Remove last DatadogStatsClient (#12490)
Co-authored-by: Zhao-Andy <17884966+Zhao-Andy@users.noreply.github.com>
2021-01-29 16:11:51 -05:00
Katie Davis
6a660776fa
fix check to remove class from null element (#12488) 2021-01-29 14:10:07 -05:00
Nick Taylor
a7da74b993
Cleaning Test Runs for End to End (E2E) Tests (#12143)
* Added custom seed task

* Added a test for the initial login for the intial admin of a forem instance.

* Renamed admin login seed data file.

* Pulled functions out of main Cypress plugin file and import them now.

* Added some comments.

* Added a comment about Cypress tasks requiring a return value to be considered successful.

* Moved admin_login_setup seed file to spec folder.

* Made change requests in regards to rake task.

* Fixed reference to SiteConfig

* Created the seeder class to be shared for all seed files.

* Added a missing param to function comment.

* Fixed seeder require in e2e test seed file.

* Fixed seeder require in seeds.rb. Why is Rails.root required?

* Added an environment guard for not being production in the e2e seed task.

* Made seeder require relative.

* Trying something for the Elastic Search issue in CI.

* Revert "Trying something for the Elastic Search issue in CI."

This reverts commit 7cb2a963c8ac1f9242c612a1b9fe8ff814605df6.

* Search indices are now removed via bundle exec rake search:destroy

* Now rake search:destroy is used in the Cypress task for resetting data as well.

* Moved Seeder class to app/lib

* Added cypress-rails

* Got two flows working with db rollbacks.

* Trimmed down the e2e dataset for now.

* Added a custom Cypress command to encompass test setup.

* removed unused e2e rake task

* added some user login/password e2e tests.

* Added a note about Cypress not cleaning cookies, so we do for the moment.

* Removed code no longer required.

* Removed comment in test that is no longer pertinent to the test suite.

* Removed data cleaning plugins as cypress rails gem handles it now.

* Added @citizen428's recommendation got raising an error if trying to seed production.

* Temporarily have paralleziation of e2e tests disabled to figure out cypres-rails/knapsack pro integration.

* Doh! Forgot a semi-colon in the Travis config.

* Added a comment about not integrating cypress-rails/knapsack pro right now.

* Removed knapsack pro npm package for now as we aren't using it.

* Reworded comment about cypress-rails/kanpsackpro.

* Removed seeding for tags to follow for onboarding in e2e seed data.

* Made pree2e script e2e:setup so it only runs explicitly when needed.

* Renamed bin/e2e to bin/e2e-ci.

* Created a new script for local e2e testing.

* Removed RAILS_ENV as it's in the e2e-ci script already.

* Fixed an auto corrected command.

* Fixed wording in e2e script prompt.

* Removed bundle exec rake data_updates:run that I had added. Doesn't appear to be necessary.

* Added missing new lines.

* Renamed e2e seed file and only use that one now. THere are no others.

* Some script cleanup.

* Added a check for the E2E environment so as to not pollute system tests.

* Now e2e test server cleanup occurs when the server shuts down.

* Put puts as this is really just for testing.

* Put environment variable in the proper place for runnning bundle exec.

* Added a check to only run for E2E tests.

* Some bash script formatting.

* Removed copy paste irrelevant comments.

* Updated e2e server shutdown message.

* Now a data-testid attribute is used for finding the user account errors panel.

* Made test selectors ignore casing of text.

* Removed prod paranoia check in e2e seed file.

* Refactored spec to use new cy.loginUser(user) command.

* Update app/lib/seeder.rb

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

* Fixed flakiness that @aitchiss was experiencing.

* Rubocop fix.

* Due to a Cypress issue, fixing cookie clearing with another tweak.

* Bumped the wait time to 500ms if cookies don't clear.

* Added a 'bundle check' to the bin/e2e script as suggested by @katiedavis.

* Removed some white space

Co-authored-by: Michael Kohl <citizen428@dev.to>
2021-01-29 13:34:01 +01:00