Commit graph

5697 commits

Author SHA1 Message Date
Michael Kohl
d5ac4cd423
[deploy] Update GithubReposController to clean up inaccessible repositories (#8382) 2020-06-11 14:06:15 -04:00
Alberto Pérez de Rada Fiol
5f75d2a49a
Fix erblint errors on the app/views/liquids folder (#8403)
* Fix erblint errors on the `app/views/liquids` folder

* Make tests pass

* Make failing test pass
2020-06-11 20:03:27 +02:00
Alberto Pérez de Rada Fiol
2ef30f6656
Fix remaining erblint errors (#8405)
* Fix remaining erblint errors

* Fix last error
2020-06-11 20:03:19 +02:00
Vaidehi Joshi
134be94b5c
Bump top-bar's z-index to allow dropdown to render with announcement (#8415) 2020-06-11 10:57:45 -07:00
Vaidehi Joshi
2b6510f4ea
Add QA instructions to pull request template (#8412) 2020-06-11 10:49:39 -07:00
Molly Struve
4c4b332b2e
Allow Knapsack to work for Forks (#8413) 2020-06-11 11:59:02 -05:00
Alberto Pérez de Rada Fiol
81f77715a6
Fix erblint errors on the app/views/mailers folder (#8402) 2020-06-11 11:34:52 -04:00
Alberto Pérez de Rada Fiol
c9bb331248
Fix erblint errors on the app/views/doorkeeper folder (#8399) 2020-06-11 11:34:31 -04:00
Molly Struve
f647944046
[deploy] Spec Speedup: Use Knapsack to Run Parallel Builds (#8390) 2020-06-11 10:27:11 -05:00
Vaidehi Joshi
e532ccbe42
Allow users to dismiss announcements (#8396) [deploy]
* Provide default crayon styles when creating banners

* Import crayons styles into /internal pages.
* Allow admins to use crayons banner styles when creating broadcasts.
* Preview banner styles with crayons.

* Add a "x" close button to announcements, fix styling to accommodate it

* Use constant and helper for broadcast banner styles

* Add VALID_BANNER_STYLES frozen constant to Broadcast class.
* Add banner_style helper for determining banner style class.

* Clean up preview CSS, import broadcast styles into preview

* Add close button click handler, clean up initializeBroadcast

* Add close functionality to announcement banner

Also hide announcement if the user has explicitly seen and "X"-ed out of it.

* Add system specs around rendering + dismissing broadcasts

* Add some (truly beautiful) JS documentation

* Add visible class to broadcast when previewed from internal
2020-06-11 08:24:43 -07:00
Alberto Pérez de Rada Fiol
2b30f769f3
Fix erblint errors on the app/views/layouts folder (#8400) 2020-06-11 16:58:50 +02:00
Alberto Pérez de Rada Fiol
2660c76fca
Fix erblint errors on the app/views/pages folder (#8401) 2020-06-11 15:46:50 +02:00
Jacob Herrington
eb09d980ab
Update example code (#8397) 2020-06-11 13:16:03 +02:00
Dana Scheider
f6a4c844cd
Implement chronological sorting of search results (#8193)
* Implement search ordering by allowing sort_by and sort_direction
params to be passed through from the search form/page.

* Change ID of select to 'sort' instead of 'order' for consistency

* Fix styling and data attributes of select options

* Enable front end to pass sort_by and sort_direction params for searches to the back end

* Ensure that only query string params that are supposed to be changed are changed in each function

* Respond to review comments (additional commits to come but these were the quick changes)

* Move options for select into template

* Use addEventListener instead of using onchange in response to review comments

* Add tabs for sorting search results

* Finish implementing tabs for ordering search results

* Remove CSS rule applying to element that no longer exists

* Remove more rules created for an element that has been removed

* Remove more code added for the select dropdown that I've removed

* Remove duplicate jobs banner
2020-06-11 13:11:01 +02:00
Josh Puetz
71fba61ae2
Properly return json (#8395) [deploy] 2020-06-10 17:38:50 -05:00
Alberto Pérez de Rada Fiol
23fdc0ca6b
Fix erblint errors on the app/views/users folder (#8389)
* Fix erblint errors on the `app/views/users` folder

* Fix mistake
2020-06-10 17:38:32 -04:00
narender2031
e78a0078a7
[deploy] Refactor 🚀 : Replaced Chat Channel Setting page with Preact component. (#8271)
* Feature 🚀 : Ability to delete messages in chat channels

- Sending message ID to frontend
- Deleting Message
- Use pusher to delete message realtime

* Minor Bug 🐞: Show message action only for current user

- User can delete or edit their own messages

* Test cases added

* Bug 🐞: Update message id for receiver

Message id was not sent to receiver by pusher

* Refactoring🛠: Message controller refactoring

* Test Cases📝 : Specs for Delete message added

* Feature 🚀 : Ability to edit messages

* Test Cases📝 : Specs for Edit message added

* 🐞 Channel List bug in mobile view

* changes in joining request responses

* 🛠  Request Managers Frontend ready

* changes in routes for adding and removing remembership

* 🚀 New routes implemented for request manager

* fix issues

* changes in api for remove membership

* Merge conflict resolved

* 🐞 Channel List bug in mobile view

* changes in joining request responses

* 🛠  Request Managers Frontend ready

* changes in routes for adding and removing remembership

* 🚀 New routes implemented for request manager

* fix issues

* changes in api for remove membership

* 🛠Optimizing for CodeClimate

* 🛠Optimizing again for CodeClimate

* 🛠Optimizing again 2 for CodeClimate

* 🛠 Added more test cases

* 🛠 Optimizing code

* 🚀 Action to open setting page added

* 🛠  Dummy page added for chat setting

* add JSON routes for chat channel settings

* Integrate chat channel settings API with UI

* 🐞 Channel List bug in mobile view

* 🛠  Request Managers Frontend ready

* changes in routes for adding and removing remembership

* 🚀 New routes implemented for request manager

* fix issues

* 🐞 Channel List bug in mobile view

* 🛠  Request Managers Frontend ready

* changes in routes for adding and removing remembership

* 🚀 New routes implemented for request manager

* fix issues

* 🛠Optimizing again for CodeClimate

* 🚀 Action to open setting page added

* 🛠  Dummy page added for chat setting

* add JSON routes for chat channel settings

* Integrate chat channel settings API with UI

* Fix PR requested changes

* Add JSDoc documentation to exported functions

* fix/add rspec test cases

* refactor channelSettinngs render part

* add test cases for chat channel settings component

* fix code-climate

* add rest component tests

* add more test coverage

* fix code-climate bugs

* add API function test

Co-authored-by: Sarthak Sharma <7lovesharma7@gmail.com>
Co-authored-by: Parasgr-code <paras.gaur@skynox.tech>
2020-06-10 16:58:37 -04:00
dependabot-preview[bot]
2d2cfe4cab
[deploy] Bump @percy/agent from 0.26.8 to 0.26.9 (#8325)
Bumps [@percy/agent](https://github.com/percy/percy-agent) from 0.26.8 to 0.26.9.
- [Release notes](https://github.com/percy/percy-agent/releases)
- [Changelog](https://github.com/percy/percy-agent/blob/master/CHANGELOG.md)
- [Commits](https://github.com/percy/percy-agent/compare/v0.26.8...v0.26.9)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-10 15:55:49 -05:00
Molly Struve
14e50630fd
Flaky Spec Fix: Clear Elasticsearch Data For js: true Specs to Fix Server Errors (#8388)
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
2020-06-10 14:12:19 -05: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
Alberto Pérez de Rada Fiol
7355bd3ee3
Fix erblint errors on the app/views/internal folder (#8387) 2020-06-10 18:37:36 +02:00
Andy Zhao
5f336d9aee
[deploy] Add crayons to reserved words (#8386) 2020-06-10 12:16:06 -04:00
Molly Struve
d5a106d11e
Spec Cleanup: Remove Unused and Redundant Code from Specs (#8385) 2020-06-10 16:59:31 +02:00
Josh Puetz
d33322f8e4
Add json template to Pages (#8357)
* Add json template to pages

* Add jsonb field, tweak form
2020-06-10 09:42:15 -05:00
Mac Siri
fb19703dba
Update UserDecorator not to cache AR Object (#8378)
* Update UserDecorator not to cache AR Object

* Change cache name

* Change cache name to reduce invalidation frequency
2020-06-10 16:39:36 +02:00
Alberto Pérez de Rada Fiol
df759bd310
Fix erblint errors on the app/views/listings folder (#8374)
* Fix erblint errors on the `app/views/listings` folder

* Move `to_json()` methods to the controller
2020-06-10 16:38:21 +02:00
Molly Struve
87c258bdec
Flaky Spec Fixes: Override Warden Test Helpers to Prevent Auth Race Conditions (#8379) 2020-06-10 09:30:36 -05:00
Michael Kohl
60f235d6eb
Use official Asciinema player embed (#8339)
* Use official Asciinema player embed

* Use postscribe to force Asciinema scripts in preview
2020-06-10 12:44:03 +02:00
rhymes
701f40e710
Improve GithubRepos error handling (#8368) 2020-06-10 11:40:40 +02:00
ludwiczakpawel
38538f63fe
[deploy] HOTFIX text wrapping (#8381)
* flare tag line height

* .

* hotfix
2020-06-10 11:26:11 +02:00
Ben Halpern
c1dca335c7
[deploy] Allow users to set a payment pointer for their content (#8304)
* Initial user payment pointer work

* Finalize functionality and tests

* Fix schema

* Update app/views/shared/_payment_pointer.html.erb

* Add function to list
2020-06-09 16:28:16 -04:00
Julianna Tetreault
b4b10a0cd7
Allow Users to Opt-out of Announcements (#8343) [deploy]
* Add display_announcements boolean to Users table
  * Adds a boolean with a default of true to Users

* Add display_announcements to #user_data and user_policy.rb
  * Adds display_announcements to #user_data in AsyncInfoController
  * Adds display_announcements to PERMITTED_ATTRIBUTES

* Add display_announcements to _misc.html.erb

* Adjust submit data request button and adjust Announcements heading
  * Adjusts submit data request button to follow button capitalization
  * Adjusts announcements heading to read Announcements not Sponsors

* Add copy to _misc.html.erb to add context around Announcement toggle

* Add request and system specs around Announcements
  * Adds a test for announcements to user_settings_spec.rb
  * Adds a system spec for updating announcements

* Add user_updates_announcements_spec file and remove old spec from users_settings_spec

* Fix spec weirdness

* Add tests around misc tab and Announcement toggle to user_settings_spec.rb
  * Tests that misc tab renders properly
  * Tests that display_announcements toggle updates a users settings properly
  * Removes user_updates_announcements_spec.rb
  * Adjusts Export Content capitalization in _misc.html.erb

* Resolve DB conflicts
2020-06-09 13:44:10 -06:00
Vaidehi Joshi
defab11a4d
Provide default crayon styles when creating banners (#8361) [deploy]
* Provide default crayon styles when creating banners

* Import crayons styles into /internal pages.
* Allow admins to use crayons banner styles when creating broadcasts.
* Preview banner styles with crayons.

* Use constant and helper for broadcast banner styles

* Add VALID_BANNER_STYLES frozen constant to Broadcast class.
* Add banner_style helper for determining banner style class.
2020-06-09 11:26:14 -07:00
rhymes
071f7b0d5c
Improve a11y in moderation panel (#8364) 2020-06-09 19:14:21 +02:00
ludwiczakpawel
14213362a7
[deploy] Rainbow loader (#8367)
* flare tag line height

* .

* .

* .
2020-06-09 17:00:50 +02:00
Arit Amana
75e627fd2c
Include logic to ensure at least one no-role user (#8366) 2020-06-09 16:46:49 +02:00
Molly Struve
a5f6183554
Flaky Spec Fix: Set Profile Image to Nil to Avoid Server Errors in js Specs (#8350) 2020-06-09 08:48:21 -05:00
Arit Amana
a6b0c1082c
[deploy] Fix Vomit Button text bug upon click (#8358)
* Fix Vomit button text in ModPanel

* Update Guide links

* Fix circle-to-oval reaction button issue

* correct stylesheet

* Fix circle-to-oval shift of reaction circle
2020-06-09 15:35:58 +02:00
rhymes
f49decf306
[deploy] Rewrite GithubRepos with async/await for better debugging (#8363) 2020-06-09 15:09:08 +02:00
Molly Struve
9e3b6a090b
Flaky Spec Fixes: Dont Assume No Elasticsearch Data, Refresh before delete_by_query (#8354) 2020-06-09 07:55:28 -05:00
icncsx
1bf5ea42f0
apply fix to title as well (#8349) 2020-06-09 11:58:09 +02:00
icncsx
d86b9d9ce5
Replace querySelector and getElementsByTagName when selecting for head and body (#8315)
Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2020-06-08 20:08:40 -04:00
Vaidehi Joshi
b388a5b1cb
Upgrade rubocop to 0.85.1 (#8360) [deploy]
Fixes an erb-lint issue (`undefined method reject for #<RuboCop::Cop::Registry:0x000055f48b351dc8>`).
See https://github.com/Shopify/erb-lint/issues/174 for more.
2020-06-08 16:16:55 -07:00
icncsx
5ba354a5c8
fix footnote anchor tag misposition (#8298)
* fix footnote anchor tag misposition

* remove important

* use scroll-margin-top prop instead of before pseudo element

* move css snippet to relevant file
2020-06-08 18:59:38 -04:00
Molly Struve
ee3792f447
[deploy] Use Javascript to Display Jobs Banner (#8303)
* Use Javascript to Display Jobs Banner

* one equal is enough

* stub SiteConfig values

* Return banner for all searches containing jobs, ensure banner is always at top, remove old job partial

* check for query before executing function
2020-06-08 18:58:00 -04:00
Ben Halpern
7285320824
Shrink mod button on narrow screens (#8359) 2020-06-08 18:55:58 -04:00
dependabot-preview[bot]
06ac507dbd
Bump webdrivers from 4.3.0 to 4.4.1 (#8318)
* Bump webdrivers from 4.3.0 to 4.4.1

Bumps [webdrivers](https://github.com/titusfortner/webdrivers) from 4.3.0 to 4.4.1.
- [Release notes](https://github.com/titusfortner/webdrivers/releases)
- [Changelog](https://github.com/titusfortner/webdrivers/blob/master/CHANGELOG.md)
- [Commits](https://github.com/titusfortner/webdrivers/compare/v4.3.0...v4.4.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Bump webdrivers from 4.3.0 to 4.4.1 (Update vendor/cache)

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-08 16:06:53 -04:00
rhymes
71d53873d1
Use Rails 6 new features in the code (#8342)
* Use pick instead of pluck first

* Use touch_all instead of update_all

* Use destroy_by instead of where.destroy_all

* Use scopes

* Fix db:seed:replant

* Remove ActiveSupport::Cache::RedisCacheStore expires_in cache
2020-06-08 16:06:29 -04:00
Molly Struve
232c67dd0a
Spec Speedup: Comment Out More Percy Only Specs (#8348) 2020-06-08 12:53:16 -05:00
Vaidehi Joshi
f04b0a7336
Display site-wide announcements (#8301)
* Serialize broadcast_data within AsyncInfoController::base_data

Adds a `broadcast:` key to our `base_data`, regardless of whether a user is logged in or not.
If a broadcast is not present, passes along a `nil` value.

* Initialize active broadcast (if present) when rendering main page

* Allow admins to preview a broadcast's processed_html when editing

* Add some fixed position styling to active broadcast

* Add system specs around broadcasts on homepage

* Use sanitize in place of html_safe when previewing broadcast

* Do not initialize broadcast if no broadcastData available

* Render default value on broadcast in options_for_select

* JS cleanup

* Unset fixed positioning for static navbar config

Also add some default styling for an active broadcast
2020-06-08 13:52:53 -04:00