Commit graph

73 commits

Author SHA1 Message Date
Molly Struve
4ab202ab0a
[deploy] Execute Reading List searches in Elasticsearch (#7440)
* Execute Reading List searches in Elasticsearch

* add additional readinglist front tests
2020-04-24 10:30:17 -04:00
Fernando Valverde
5dc0ebbb04
Copy to clipboard fixes including support for Android Native Bridge (#7382)
* Adds Clipboard Async API & makes use of Android Native Bridge interface for write post image copy to clipboard

* Checks for clipboard api support before trying to use it

* Adds support for comment dropdown copy link

* Adds AndroidBridge to globals definition
2020-04-21 10:36:49 -04:00
Molly Struve
2c99424205
[deploy] Execute Feed Searches through Elasticsearch (Round 2) (#7231) 2020-04-17 08:38:07 -05:00
Alex
cecddf3097
[deploy] Add name to tags component (#6802)
* Add name to tags component

* Remove old form field

* Update Jest snapshots

* Put form field back in

* Remove explicit name from form field

* Add comment explaining keeping tag_list form field

* Typo - faciliate --> facilitate
2020-04-07 09:50:45 -04:00
Molly Struve
d1fc988ed0
[deploy] Revert "Serve Feed Content From Elasticsearch (#6847)" (#6983)
This reverts commit d7cc1da280.
2020-03-31 16:25:48 -05:00
Molly Struve
d7cc1da280
[deploy] Serve Feed Content From Elasticsearch (#6847)
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
2020-03-31 13:30:36 -05:00
Alex
bc8c126497
Validate file uploads client-side (#6737)
* JavaScript MVP

- First round of linting
- Use for testing

* Add some default UI error handling

* Add file validation to updating profile image

* Add type validation and fix size bug

* Refactor and add file validation to article cover

* Add file validation to body images

* Add accept field to profile image form

* Add parseInt to maxFileSizeMb

* Add accept and max-file-size-mb to article images

* Change parseInt to Number

* Add file validations to podcast form

* Add accept image to podcasts

* Add file validation and accept field to org form

* Use appendChild for error message

* Add file validation to comment form

* Add JS Docs comments

* Remove redundant format check

* Add documentation to override default values

* Update documention (spelling, formatting, etc.)

* Update max-file-size-mb to 25

* Bump default max file size for images to 25

* Change appendChild to append

* Refactor remove error message

* Refactor JS, remove console logs, update error msg

* Remove video from permitted file types

* Update error messaging

* Update docs for funciton params...oops 🙈

* Fix file size check logic

- Allow for 0 maxFileSizeMb
- Use JSON.parse() for permittedFileTypes to get an Array

* Add specs

* Change blackbox to black box

* Remove wait_for_javascript

* Remove comments from spec
2020-03-24 09:21:49 +01:00
Faruk Talha Özbek
063efff5f6
fixed some eslint errors (#6476) 2020-03-06 20:03:49 +01:00
Alex
35651b26e5
Remove Algolia from Comments (#6464) [deploy]
* Remove Algolia from comments

* Remove more references to ordered_comments index

* Remove more references to Comments Algolia index

* Fix index_worker_spec
2020-03-05 11:30:25 -08:00
Mac Siri
9f58b12f67
Make localstorage draft respect newer saved draft (#6343) [deploy] 2020-02-28 15:17:21 -05:00
Molly Struve
7ff79f77b8
Search Tags in Elasticsearch from Classified Listing and Post Creation (#6024) [deploy] 2020-02-17 08:16:45 -05:00
Vaidehi Joshi
b09a0c60f3
Add comment to highlight difference between previewing in v1 and v2 editors (#5894)
A follow-up to https://github.com/thepracticaldev/dev.to/pull/5873.
2020-02-04 08:32:06 -08:00
Vaidehi Joshi
db3e6128ac
Render main image in article preview for v2 editor (#5873) [deploy]
Previewing a main image on an article was broken in v2 of the editor :(
We had some tests for this (which I wrote), but the setup for the tests weren't quite right!
This commit fixes the bug, and also refactors and cleans up our tests quite a bit.
Also adds some snapshots for both v1 and v2 editors in a "no image" preview state.
2020-02-03 16:58:11 -05:00
Vaidehi Joshi
9fb8875085 Use the correct cover image in article form preview (#5660) [deploy]
Fixes #5630, wherein the cover image from the article data was appearing in the preview.
2020-01-23 17:06:06 -05:00
rhymes
040b36bceb Fix event propagation for click on tag rules in editor (#5280) [deploy] 2020-01-02 13:04:16 -05:00
Bolarinwa Balogun
5fc0a12f26 Resolve TypeError when clearing new changes in articleform (#4963) [deploy]
* Resolve TypeError when clearing new changes in articleform

* Revert cursor change
2019-11-29 14:40:19 -05:00
Ben Halpern
c817ac0192
Fix missing series in article edit form (v2) (#4867) [deploy] 2019-11-22 08:33:55 -05:00
Bolarinwa Balogun
4536d35716 Fix broken layout from "additional config/settings" overlap (#4858) [deploy]
* Fix broken layout from "additional config/settings" overlap

* Resolve bugs by adding important state fields
2019-11-20 14:34:30 -05:00
Ben Halpern
bb2eb72455
Fix issue where cover image shows up when it shouldn't (#4583) 2019-10-24 18:23:17 -04:00
Nick Taylor
68e94f524b Refactored to use a common <OrganizationPicker /> component (#4470)
* Refactored to use a common <OrganizationPicker /> component.

* Small refactor to organization <option />s.

* Renamed files from OrgSettings* to OrganizationPicker*

* Brought orgsettings inline to article form.

* Brought orgsettings inline to listings form.

* Rename onBlur to onToggle for org picker instances. Ooops.

* Updated <OrganizationPicker /> test.
2019-10-24 17:27:16 -04:00
Hoang
7cd279f3e1 Fix article submission clone bug (#4505) 2019-10-21 15:40:29 -04:00
Tamas Fodor
0d2506f9ef Fix eslint issues in article-form's jsx files (#4217)
* fix eslint issues in article-form's jsx files

* Use e.key instead of deprecated e.keyCode

* Put back whitespace but in html format

* use re-usable SetupImageButton comp, use window.confirm, put back console.log temporarily

* import deep

* fix CoverImage className prop issue

* update jest snap files

* remove no-restricted-globals from eslint-disable-next-line
2019-10-19 17:09:06 -04:00
RajaSK05
6b83cd0981 Refactor to component model (#4478) 2019-10-17 12:56:33 -04:00
Karin Hendrikse
0ff237cf20 Add specs for errors, mainimage, and notice (#4453) [ci skip] 2019-10-15 16:46:25 -04:00
RakChamp25
e690348824 Refactor: moreConfig.jsx (#4352)
* Refactor: moreConfig.jsx

* Revamp Changes

* Revamp TextField Proptypes

* Fix Text Field and revamp changes

* Removed trailing spaces
2019-10-14 08:44:45 -04:00
Ben Halpern
0a60faec8c
Add tag rules to article v2 editor (#4339)
* Add tag rules to article v2 editor

* Add bottom phrase to tag dropdown

* Remove console logs

* Remove empty space in css

* Remove commented code and clean up css

* Add type='button' for a11y
2019-10-10 20:19:12 -04:00
RakChamp25
e00e7c3412 Refactor : BodyPreview.JSX (#4348) 2019-10-10 13:21:53 -04:00
Karin Hendrikse
14c9adefd5 Test: add test for opening help window on articleForm (#4237) 2019-10-07 08:49:44 -04:00
Aswathprabhu
65394cb8cc Refactoring articleForm.jsx removes code duplication (#4159) 2019-10-01 12:05:57 -04:00
Jacob Herrington
7198a72953 Refactor tags components (#3895) [ci skip] 2019-09-20 10:18:44 -04:00
rhymes
61494d2343 Images uploads: fix UI for multiple images (#3958)
* Fix spacing of images button in editor v1

* Fix wording for multiple images in editor

* Update JS tests
2019-09-07 10:57:14 -04:00
Bolarinwa Balogun
41aff162cc Allow upload of multiple images at a time (#3599)
* Allow upload of multiple images at a time

* Update schema.rb
2019-08-18 15:03:14 -04:00
Jacob Eubanks
180935bd37 Delete unused, commented-out code (#3722) 2019-08-15 12:24:48 -04:00
Andy Zhao
0f46b0deed Add Stack Exchange Liquid tag (#3637)
* Add Stack Exchange Liquid tag

* Add Stack Exchange/Overflow tag

* Convert to integers

* Add better error handling

* Make all links open in new tab

* Adjust names and refactor a bit

* Use key for every API call

* Add new lines to end of svg files

* Add better error handling

* Fix edge case where input is not numeric

* Finalize Stackexhange tag design and functionality

* Fix css typo

* Update snapshots

* Fix snapshot back
2019-08-14 15:01:47 -04:00
Jacob Herrington
97d04df965 Add place holder alt text to markdown link (#3687) [ci skip] 2019-08-12 11:57:06 -04:00
Bolarinwa Balogun
4dd90c5dd1 Fix upload overlap with editor/help page (#3640)
* Fix upload overlap with editor/help page

* Update test snapshot
2019-08-07 15:35:28 -04:00
Ali Spittel
52c60ce37e Feature/refactored onboarding (#3333)
* 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
2019-07-26 15:53:32 -04:00
Bolarinwa Balogun
cdd8870de5 Add copy button to markdown image upload (#2957) 2019-07-17 11:05:21 -04:00
Elecweb
ebf9208877 Add support for hotkey to toggle article preview (#3308) [ci skip] 2019-07-16 14:35:45 -04:00
Sushant Bajracharya
01d1d1bcea Make the Preview button dynamic (#3317) 2019-07-10 19:14:14 -04:00
Mac Siri
90f54773dc
Fix GistTag & RunkitTag preview issue (#3388) 2019-07-09 15:58:08 -04:00
Daniel Compton
f75aef42f9 Add a space between "Change meta tag" and canonical_url (#3063)
Without the space, this shows up as "Change meta tagcanonical_url".
2019-06-07 21:15:32 -04:00
Ben Halpern
119d0f69d6
Finalize multi-org features (#3041)
* Finalize multi-org features

* Fix credits count issues

* Only show org list if multiple orgs on dashboard

* Add check for organizations to JS
2019-06-04 13:56:22 -04:00
Andy Zhao
47d9ec27fb Allow users to belong to multiple orgs (#2583)
* Allow user to have many orgs

* Allow users to handle multi orgs in settings

* Make rounded buttons inline

* Add multi org function to dashboards

* Fix merge conflicts

* Fix mistake in merge conflict fix oops

* Display the correct membership level

* Fix accessibility issues

* Display organizations for article editors

* Handle submitting org id with preact editors

* Make listings work with multiple organizations

* Allow listings to have multiple orgs on create

* Display the correct number of credits for each org

* Move script tag to Webpack

* Allow multi orgs for purchasing and viewing credits

* Use OrganizationMembership as authorization check

* Display multiple organizations for notifications

* Allow dashboard to be viewable under multi-orgs

* Remove unused method

* Add multi-org functionality for article editors

* Show pro dashboard buttons for member+ org levels

* Leave the correct organization

* Allow article API to change org id

* Add left-out authorization method oops

* Make nav buttons a bit more clear

* Fix merge conflict

* Fix adding org id for /api/articles and tests

* Fix tests for org policy

* Use proper logic for displaying org members

* Update org actions with new authorization

* Use correct org when creating a listing

* Remove additional payment charge oops

* Mark org notifications as read with authorization

* Remove deprecated post_as_organization attribute

* Use new org_admin syntax

* Remove deprecated org logic for article create and update

* Default all RSS posts to not belong to any org

* Render org_member page for guest users

* Update org policy spec to work with multi orgs

* Use org_membership for org traits and move identity code

* Use org_member trait

* Update to work with multi-orgs

* Validate article's org_id if param org_id is blank

* Make  a let variable

* Remove unnecessary eager load for credits

* Fix HTML structure and org logic for non-org users

* Update credits spec for multi-org

* Add test for failed payment when purchased by org

* Lint listings_spec

* Test that the listing was created under the user

* Add tests for POST /listings multi-org

* Use double quotes for classes

* Fix /manage and a few other multi-org bugs

* Fix test for multi org

* Use correct method SQL exists? not Rails exist?

* Fix reads spec for multi-org

* Fix org_controller actions to work with multi org

* Test only multi org and not old usage and fix leave_org

* Fix org showing user profile img test for multi-org

* Fix org logic for users with no orgs

* Remove switch org functionality

* Update tests and add hidden param for org id

* Redirect to the specific organization

* Test other org button actions

* Use settings_notice instead of legacy notice and refactor

* Fix weird extra end issue prob from merge conflicts

* Test for with new flash key

* Fix user_views_org tests for multi-org

* Test for new flash message

* Update snapshot with new a11y html

* Move styling to stylesheet

* Add site admins functionality

* Move org_member? method in user model and refactor

* Use unspent_credits_count for organizations

* Add tests for /listings/new and minor bug fixes

* Use .present? in case of empty array

* Fix a lingering deprecated method

* Use greater than 1 for random numbers

* Add tests for counting spent and unspent credits
2019-06-04 09:30:52 -04:00
briwa
b301bf8def fix(article): scroll to top when inserting image (#2998) 2019-05-31 10:29:42 -04:00
rhymes
38aa45c8e3 Cleanup bodyPreview component (#2980) [ci skip] 2019-05-28 23:55:37 -04:00
rhymes
09a99d93a3 Return errors instead of raising an exception on ArticleCreation (#2922) 2019-05-21 15:18:02 -04:00
Ben Halpern
ec900a3146
Add safe navigation within chatchannelmemberships and remove some console.logs (#2903) 2019-05-20 13:20:06 -04:00
Ben Halpern
fb6904f86d
Fix up articles controller (#2855)
* Fix up articles controller

* Update request specs

* Add proper post_under_org tests

* Remove create_job_opportunity

* Add user profile back in
2019-05-16 13:56:26 -04:00
rhymes
941ab4178b Articles API: create and update (#2844)
* Add system test to create article from the editor

* Move article creation from API to app controller

* Fix system test to edit posts

* Move article update from API to app controller

* Rewrite create article API using API key

* Add main_image and canonical_url to allowed creation params

* Rewrite update article API using API key

* Fix tests and have Comments API inherit from API
2019-05-16 12:26:24 -04:00