Commit graph

2009 commits

Author SHA1 Message Date
Ben Halpern
244195fc92
Move mailchimp API key to app logic (#10270) 2020-09-10 13:25:55 -04:00
ludwiczakpawel
009c89d843
Organizations profile header redesign (#10258)
* organizations profile header

* merge

* tests

* .
2020-09-10 12:42:36 +02:00
Ben Halpern
f275204e1c
[deploy] Proper cache delete_matched (#10267) 2020-09-09 18:18:17 -04:00
Molly Struve
9c7c4e7062
[deploy] Optimization:Increase refresh_interval For Possible High Indexing Indexes (#10215) 2020-09-09 17:07:15 -05:00
Ben Halpern
310df39e27
Include locale in fragment cache key (#10199)
* Include locale in fragment cache key

* Adjust specs
2020-09-09 16:58:04 -04:00
Mac Siri
9ebd742712
[deploy] Reintroduce sticky_nav changes (ab81f36 & 7f92855) (#10263)
* Revert "[deploy] Revert removal of unneeded eager load (if needed) (#10179)"

This reverts commit 11c7b148da.

* Revert "[deploy] Revert "Migrate ProfileImage to Images::Profile (#10055)" (#10149)"

This reverts commit 5657067e55.
2020-09-09 15:33:13 -04:00
Julianna Tetreault
751c910291
Give Admins the Ability to Add Co-Authors to Posts (#10252) [deploy]
* Adds second_user_id and third_user_id to Admin::Articles::Controller and Article model
  - Add second_user_id to #update
  - Add third_user_id to #update
  - Add second_user_id to #article_params
  - Add third_user_id to #article_params
  - Add second and third user_ids to :limited_columns_internal_select

* Adds a second_user_id and third_user_id form field to _individual_article.html.erb

* Adds tests around adding a co-author and multiple co-authors to an article in articles_spec.rb
2020-09-09 10:25:25 -06:00
Michael Kohl
4ae59b56e3
Add custom profile fields (#10202)
* Add custom_profile_fields table

* Add CustomProfileField model and refactor

* Remove trailing whitespace

* Stop ignoring removed column

* Add explanatory comment

* Update service object

* Fix bug in service object

* Refactor and fix specs

* Increase limit from 3 to 5

* Update comment to reflect code changes
2020-09-09 14:37:15 +00:00
Rafi
327fe14ccb
Fixing id and class of non featured article (#10247)
* Fixing id and class of non featured article

* Adding id

* Removing extra space

* Fixing broken rspec test
2020-09-08 18:38:49 -04:00
rhymes
5c7fc79507
[deploy] Add unique index on articles feed_source_url (#10208)
Co-authored-by: Molly Struve <mollylbs@gmail.com>
2020-09-08 14:34:34 -05:00
rhymes
b185dca976
[deploy] Remove draft articles with duplicate feed source URL and cleanup invalid data: take 2 (#10239) 2020-09-08 11:53:41 -05:00
Michael Kohl
729a17a7a3
[deploy] Add LiquidTagsController (#10241) 2020-09-08 12:07:33 -04:00
rhymes
2d881ef571
Routine rubocop fixes (#10237) 2020-09-08 12:06:47 -04:00
Michael Kohl
5aefa6279a
Change spec to use change over absolute count (#10242) 2020-09-08 09:18:02 +02:00
Michael Kohl
acaeba0b3e
Fix spec (#10235) 2020-09-08 09:10:37 +07:00
rhymes
99b239bb80
[deploy] Add unique index on articles canonical_url (#10161) 2020-09-04 14:19:13 -05:00
Molly Struve
2f36630ff0
Revert "Remove draft articles with duplicate feed source URL and cleanup invalid data (#10205)" (#10209)
This reverts commit 375f79099e.
2020-09-04 12:22:06 -05:00
rhymes
375f79099e
[deploy] Remove draft articles with duplicate feed source URL and cleanup invalid data (#10205) 2020-09-04 11:20:59 -05:00
Ben Halpern
b3f1e53ec7
[deploy] Add ga tracking to config (#10150)
* Add ga tracking to config

* Remove empty line

* Remove console.log

* Fix typo

* Update app/assets/javascripts/initializers/initializeBaseTracking.js.erb

* Add google tracking id example
2020-09-04 09:37:16 -04:00
Michael Kohl
27faf0a667
Add profiles controller (#10181)
# Conflicts:
#	config/routes.rb
2020-09-04 14:54:39 +02:00
Alex
2a5a933ed1
Add routes for i18n (#10193)
* Add routes

* Update all_routes spec

* Add i18n route specs

* Add docs

* Docs cleanup

* Add note about fragment caching
2020-09-03 17:11:07 -04:00
Molly Struve
d0d3c2a2ab
[deploy] Bug Fix:Sort Reactions by created_at (#10171) 2020-09-03 14:18:02 -05:00
Fernando Valverde
536b2c821c
Adds ability to create new sponsorships from admin dashboard (#10187)
* Adds create feature to the sponsorships admin dashboard

* Fixes spec
2020-09-03 10:10:37 -06:00
ludwiczakpawel
74b398d876
New Profile Header (#10185)
* init

* profile header

* merge

* two headers

* centerd

* link fix

* remove comments

* whoops

* Fix specs

Co-authored-by: rhymes <rhymes@hey.com>
2020-09-03 16:47:01 +02:00
Diogo Osório
4c53c59d96
[deploy] Fixes a duplicate page title on the /videos page (#10170)
* Fixes a duplicate page title on the /videos page

So the `app/views/videos/index.html.erb` was invoking the `#title`
helper method 3 times.

In each invocation the helper method was calling
`content_for(:title) { derived_title }`. Looking at the `content_for`
documentation
[here](9055156668/actionview/lib/action_view/helpers/capture_helper.rb (L117)),
you can find the following comment:

```
Note that <tt>content_for</tt> concatenates (default) the blocks it is given
for a particular identifier in order. For example:
```

Which basically meant that each time the helper got invoked, the title
was appended to the end of the existing title.

This commit fixes the issue by making sure that the `#title` helper is
only invoked once by the view.

* Empty commit, trigger the build
2020-09-03 16:07:11 +02:00
Michael Kohl
d284e597cd
[deploy] Add Profiles::Update service object (#9912)
* Add Profiles::Update service object

* Refactor

* Rename Profile.fields to Profile.attributes

* Keep sync from user -> profile

* And and update comments

* Rename Profile.refresh_store_accessors!

* Make forwarding getters in user dynamic

* Add more explanation

* Fix typo

* Update service object

* Fix return value

* Fix specs

* Travis, let's be friends again?

* Remove Travis change

* Add require_dependency in Profile

* Refactor

* More refactoring

* Avoid double sync

* Fix specs

* Fix mapped attributes sync
2020-09-03 09:19:25 -04:00
Michael Kohl
adbdbb9789
Add ProfileFieldGroupsController to API (#10124) 2020-09-03 10:12:53 +07:00
Arit Amana
b79766f697
[deploy] [Admin Tooling] Allow admins unpublish articles from the Mod Actions Panel (#10038) 2020-09-02 16:08:08 -05:00
Molly Struve
83d44401f5
[deploy] Index Reaction created_at Timestamp (#10142) 2020-09-02 12:56:33 -05:00
Molly Struve
34593b7ec3
[deploy] Optimization:Select Article Columns for Digest Email, Limit 6, Use User Attributes (#10147) 2020-09-02 11:31:43 -05:00
Fernando Valverde
ada2d0c728
[deploy] Extracts DisplayAds from Administrate into admin (#10153)
* Extracts DisplayAds from Administrate into admin

* Suggested changes
2020-09-02 09:28:22 -06:00
Ridhwana
3474ffda6d
Profile Admin updates (#10133)
* feat: cater for when there are no profile fields in a group

* feat: add a modal to create a new group

* feat: add a controller and route for the group

* refactor: add group modal

* feat: edit a group

* chore: remove an instance var

* chore: toggle the section using a toggle button

* feat: add the edit button

* chore: update the messaging

* chore: update the class name

* feat: delete the group

* chore: add some css

* chore: use group_name

* chore: rename the file and add the group select to the file

* feat: render the correct partial and add the profile_field_group_id

* feat: add a profile field

* feat: amend the styles on the card header

* feat: add a cursor pointer

* feat: get the form to redirect after an update

* chore:  remove style

* feat: order by created at so that each time we save the order doesn't change

* fix: change the form

* chore: format the options

* feat: show ungrouped fields at the bottom

* feat: add the profile fields length

* chore: remove unused action

* test: add some specs for profile group workflow

* fix: oops

* refactor: grouped profile fields

* refactor: amend the styles

* chore: rename methods

* chore: update headings

* chore: remove changes from my linter

* refactor: suggestions by Michael - upgrade ternary

* refactor: order by name and label
2020-09-02 12:32:25 +02:00
Michael Kohl
f023c6174f
[deploy] Add data update script for profile fields (#10119) 2020-09-02 09:54:04 +07:00
Molly Struve
b60c6c687c
Flaky Spec Fix:(Attempt)Ensure Article Suggester Count is Consistent (#10146) 2020-09-01 20:27:46 -04:00
Molly Struve
5657067e55
[deploy] Revert "Migrate ProfileImage to Images::Profile (#10055)" (#10149)
This reverts commit ab81f36a38.
2020-09-01 18:28:58 -05:00
Mac Siri
23cee97d0a
Fix Flaky Runkit system spec (#10148) 2020-09-01 19:22:12 -04:00
Mac Siri
ab81f36a38
[deploy] Migrate ProfileImage to Images::Profile (#10055) 2020-09-01 17:16:03 -04:00
Molly Struve
79b00d4960
[deploy] Optimization:Throttle Noisy Honeycomb Events More (#10143) 2020-09-01 15:21:07 -05:00
Diogo Osório
a5e7b1cf60
Rely on error types to determine when a repo should be removed on the RepoSyncWorker (#10131)
* Registers the Github AcocuntSuspended & RepositoryUnavailable errors

Adds the above-mentioned errors to the list of known errors raised by
Octokit as to make possible for the rest of the application to
specifically trap those.

* Makes the RepoSyncWorker error handling rely on types

The current implementation attempted to parse the error message to
determine if the error reported by Github's API can/should be handled,
this commit changes the implementation so that the exception type is
used instead.
2020-09-01 15:01:23 -04:00
Andy Zhao
0b849341e0
Remove ghostify from app (#10139)
* Remove ghostify from app

* Remove unused ghostify specs
2020-09-01 13:39:39 -04:00
Ben Halpern
7b5bc89b7c
Allow admins to set brand color (#10097)
* Allow admins to set brand color

* Remove extra line

* Fix linting

* Update app/controllers/admin/configs_controller.rb

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

* Move wcag compare to own class

* Remove unnecessary spacing

Co-authored-by: Michael Kohl <citizen428@dev.to>
2020-09-01 11:16:31 +02:00
Molly Struve
31acf735cb
Comment out Flaky Reaction Search Sort Spec (#10118) 2020-08-31 19:16:45 -04:00
Lisa Sy
54c071856e
[deploy] Update top-header for logged-out user (#9874)
* Create first start at desktop top header updates

* Update mobile styling of top header

* Stylize sign in widget card

* Update nav menu and top bar

* Changes based on user being logged-in or not

* Uses user_signed_in? on top nav bar

* Fix lingering old cloudinary helper method

* Trigger CI

* Fixes specs

* Adds redirect_using_referer_spec, fixes other specs & cleanup

* Adds nav-menu.scss to layouts/_styles.html.erb for inline & small edit in referer check

* Remove logged-out styles to make it more uniform with logged in

* Remove nav-menu.scss file

* cleanup markup and JS a little

* Fixes FB auth specs to new login links

* Makes sure unauthenticated /new redirects back to editor

* CI fix Sing in with -> Continue with

* Update db/schema.rb

* Update db/schema.rb

* Update db/schema.rb

Co-authored-by: Fernando Valverde <fdov88@gmail.com>
Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com>
Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2020-08-31 18:12:22 -04:00
Ben Halpern
7ba7d9fc46
Add logic for asking for FOREM_OWNER_SECRET to be present on first user sign up if set by system (#10108)
* Add logic for requiring FOREM_OWNER_SECRET to be present

* Fix test logic
2020-08-31 16:41:30 -04:00
Molly Struve
667f3c9edf
[deploy] Refactor:Email Digest Sending Logic (#10107) 2020-08-31 14:28:55 -05:00
Diogo Osório
4b8a725681
Fixes brakeman open redirect warnings at pages_controller (#10095)
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).
2020-08-31 13:39:04 -04:00
Lisa Sy
5ff2ad7437
Update main authentication view to improve visual design (#9856) [deploy]
* Update mobile version of /new registration view

* Optimize styles for desktop view

* Fix typo

* Fix typo

* Add twemojis in footer area

* Update messaging to fulfill all intents

* cache

* cache

* hr-label fix on mobile

* hr-label fix on mobile

* crayons for checkbox

* crayons for checkbox

* remove old styles

* move signin to appropriate folder

* Remove schema changes

* Fix registraction specs and hide password hint for no SSO enabled

* Disable email hint for password reset page

* Fix specs

* Revert "Disable email hint for password reset page"

This reverts commit b33a6dda4c13534541294281f83f7ad5a4864c0d.

* Transfer User.registered.estimated_count to the controller

* Fix import path

Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com>
Co-authored-by: rhymes <rhymes@hey.com>
2020-08-31 09:55:27 -07:00
Ben Halpern
dba151915b
[deploy] Allow initial user to sign up and configure app (#10073)
* Allow initial user to sign up and configure app

* Fix added value unneeded

* Make siteconfig public in tests

* Remove deprecated method and adjust seed default

* Add new controllers not to redirect for public

* Modify tests

* Edit test defaults

* Fix linting

* Add starter mode to seed file
2020-08-31 12:54:22 -04:00
Molly Struve
0b8df875da
[deploy] Bug Fix:Destroy GithubRepos with Suspended or Blocked Access (#10103) 2020-08-31 11:32:15 -05:00
ludwiczakpawel
8ec4044f3e
[deploy] Adding Crayons to Admin (#10015)
* layout

* user

* config

* header

* badges, badge_achievements, layout

* broadcasts

* chat channels

* comments.. not much really

* Events

* growth

* listings

* mod actions

* mods

* orgs

* pages

* permissions

* podcasts

* reactions

* profile fields

* reports

* response templates

* tools

* users

* Secrets

* webhooks

* welcome threads

* .

* internal

* css fix

* .

* main element elsewhere

* scope

* bring back some of the old styling

* .

* .

* .

* notice

* Revert schema.db

* add alert

* little fixes

* profile fields

* Update schema.rb

* closing span

* another span

* Fixed broken admin specs.

Co-authored-by: Nick Taylor <nick@dev.to>
2020-08-31 10:29:06 -04:00