Commit graph

124 commits

Author SHA1 Message Date
Nick Taylor
2c79a4c122
Remove non application files from frontend code coverage (#11752)
* Convert index.jsx to index.js as they are just barrel files.

* Removed prop types and eslint configs from code coverage.

* Using <root_dir> in test ignore patterns now.

* Added app/javascript/storybook-static to eslint's ignore list.

* Now .storybook is excluded from code coverage.

* Bumped coverage thresholds

* Fixed to <rootDir>
2020-12-04 20:00:20 -05:00
ludwiczakpawel
d43ff0d46c
Series overflow fix (#11683)
* tooltips 1.0.1

* tooltips 1.0.1

* series selector
2020-11-30 17:12:10 +01:00
Nick Taylor
d623157eee
Fixed some frontend tests causing unhandled rejection errors (#11627)
* Fixed unhandled rejection in <ImageUploader /> test.

* Fixed <FollowUsers /> tests.

* Fixed the tests for the <RequestManager /> component.

* Fixed unhandled rejection in search utilities.

* Added an unhandledRejection listener so tests will fail if a Promise fails.

* Added a comment about why you might get an unhandled rejection exception.
2020-11-26 06:11:25 -05:00
Thomas Bnt
3d8049697a
Edited URLs settings/ux to settings/customization (#11618) 2020-11-25 12:29:12 -05:00
Nick Taylor
bf7780cd2c
Ran prettier on *.js, *.jsx and *.md files. (#11586) 2020-11-23 20:45:50 -05:00
Rafal Trojanowski
4bc8b80a90
Introduce tweet_timeline liquid tag (#7605) (#10825) 2020-10-30 11:03:40 +01:00
Rafi
52f2627e6c
Refactoring EditorAction (#10894)
* Refactoring EditorAction

* Removing useCallback

* Renaming variables to isVersionX
2020-10-29 09:06:30 +01:00
Cassey Lottman
64dce93088
clarify how to add multiple tags (#11082) 2020-10-26 14:57:51 +01:00
Andrew Bone
c629459ba9
refactor: Use keyboard shortcut hook in article form (#11014)
* Move to new keyboard shortcuts

* No longer required

* Import order

* Import order

* Add trailing comma

* Remove keyboardShortcutsHandler from exports

* Remove pointless arrow function
2020-10-22 12:03:10 -04:00
Mac Siri
dd8745ca33
[deploy] Store Article's main_image path unprocessed (#10867) 2020-10-16 14:46:37 -04:00
ludwiczakpawel
ebe398ba23
[deploy] Logo updates (#10840)
* logo updates

* fix

* fix

* drop it like its hot

* no siteconfig

* um...
2020-10-14 16:13:42 -04:00
Manaswini
e920155a93
Remove tabindex of -1 on upload image input in the write a post editor (#10543)
* Remove tabindex of -1 on upload image input in the write a post editor

* Remove negative tabindex on image uploader's outer button

* Give tabindex of -1 to outer button on image uploader

* Update buttons.scss
2020-10-08 21:57:22 +02:00
Akshay Mahajan
b592ab6c83
added z-index to post editor options dropdown (#10536) 2020-10-02 15:55:46 -04:00
Fernando Valverde
1aa8233d9e
Adds runtime copy to clipboard (#10323) 2020-09-14 14:45:54 -04:00
ludwiczakpawel
6c3f5d51fe
Drop containers styling (#10203)
* Refactored drag n drop functionality to a hook and component.

* Add the snackbar to the article editor.

* Now you can drag and drop images in the post body content.

* Cleaning up a few things.

* Now post cover images can be dragged and dropped.

* Removed unused empty function.

* Added @testing-library/preact-hooks so that we can test hooks.

* Some renaming, small refactor.

* Added tests

* Added more tests.

* Added more tests.

* Added message about dropping only one image in post body.

* Added message about dropping only one image for cover image.

* put onDrop into it's own meethod.

* More tests.

* Added some API documentation.

* Updated editor help with drag and drop image help.

* drag and drop styling

* .

* revert

* Fixed broken test.

Co-authored-by: Nick Taylor <nick@dev.to>
2020-09-09 09:37:16 +02:00
Nick Taylor
e2d43c4a73
[deploy] Fixed issue with drag and drop image for cover image in editor. (#10254) 2020-09-08 16:43:23 -04:00
Nick Taylor
f0963c1bfa
Drag and drop an image in the editor (#10145)
* Refactored drag n drop functionality to a hook and component.

* Add the snackbar to the article editor.

* Now you can drag and drop images in the post body content.

* Cleaning up a few things.

* Now post cover images can be dragged and dropped.

* Removed unused empty function.

* Added @testing-library/preact-hooks so that we can test hooks.

* Some renaming, small refactor.

* Added tests

* Added more tests.

* Added more tests.

* Added message about dropping only one image in post body.

* Added message about dropping only one image for cover image.

* put onDrop into it's own meethod.

* More tests.

* Added some API documentation.

* Updated editor help with drag and drop image help.

* Changed wording.

* Now the alt text for markdown removes the file extension.

* Updated help wording. Thanks @rhymes

* Now the image markdown adds a new line at the end as we currently do not support inline images.
2020-09-04 14:12:59 -04:00
ludwiczakpawel
11831e72c1
Extending documentation... (#10156)
* textarea component

* docs / faq: add new follower

* credits

* lang

* moving copy higher

* typo

* Update docs/faqs.md typo

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

* Update docs/faqs.md lang

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

* Update docs/faqs.md lang

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

* Update docs/faqs.md

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

* Update docs/faqs.md

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

* Update docs/faqs.md

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

* Update docs/faqs.md

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

* Update docs/faqs.md

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

* Update docs/faqs.md

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

* Update app/javascript/article-form/components/Title.jsx

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

* Update docs/faqs.md

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

* Update docs/faqs.md

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

* Update docs/faqs.md

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

* Update docs/faqs.md

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

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
2020-09-03 10:53:22 -04:00
Sarthak Sharma
b26b031616
🚀 Feature: Ability to upload images to connect by drag and drop (#9992) 2020-08-31 14:14:32 -04:00
rhymes
cd65273571
Use explicit name for Preact fragments (#10049) 2020-08-28 10:01:17 -04:00
Fernando Valverde
9da71a47c7
[deploy] Introduces Runtime class for standardized & other native cleanup + replace podcast GA with ahoy (#10026) 2020-08-28 05:52:04 -06:00
ludwiczakpawel
1776377234
Improve styling for series (#9893)
* .

* flare tag line height

* .

* series switcher

* .

* revert

* editor preview fix

* Fix broken spec

Co-authored-by: Mac Siri <krairit.siri@gmail.com>
Co-authored-by: rhymes <rhymes@hey.com>
2020-08-24 09:53:51 +02:00
ludwiczakpawel
877bdba176
Typography fix & Optimization (#9650)
* flare tag line height

* .

* dropdown fix + actions bar fix

* actions bar on mob

* fixing typography and improving font handling

* cleanup

* variables naming

* fonts swapping

* Makes user's default font render as SiteConfig.default_font

* Trigger checks

* Fixes missing user model specs

* Fixes storybook CI error import & logged out user font set with default

* Limits default_font config to serif, sans-serif & open-dyslexic

* Default font description text

Co-authored-by: Fernando Valverde <fdov88@gmail.com>
2020-08-18 08:05:51 -04:00
Sophia
f9137b2abd
[deploy] Update <ImageUploader /> class component to use hooks (#9369) 2020-07-27 17:09:28 -04:00
Jacob Herrington
cc6a79ad57
[deploy] Fix tag input patterns (#9363)
* Fix tag input patterns

* Trigger build

* Increase JS test coverage for CI
2020-07-20 08:06:36 -05:00
Jacob Herrington
9e08ae6f1f
[deploy] Restrict tags input regex (#9172) 2020-07-16 12:28:03 -04:00
ludwiczakpawel
9ee54bfe45
[deploy] Add crayons to pages (#9175)
* flare tag line height

* .

* dropdown fix + actions bar fix

* actions bar on mob

* .

* .
2020-07-07 09:43:54 -04:00
ludwiczakpawel
01f4183204
Code highlighter fix (#9176)
* flare tag line height

* .

* dropdown fix + actions bar fix

* actions bar on mob

* .

* typo

* .
2020-07-07 09:54:24 +02:00
Nick Taylor
6542395b38
Upgraded to preact testing library 2.0.0 (#9103) 2020-07-06 14:53:10 -04:00
ludwiczakpawel
82d99f5834
[deploy] Add collapsible panel to markdown help in editor (#9050) 2020-07-02 07:58:07 -05:00
Nick Taylor
9fc79cf034
Added pragmaFrag so terse Fragment syntax,<></>, can be used in Preact. (#9051) 2020-07-01 09:19:33 -04:00
Nick Taylor
3833b17a66
Added upload spinner for cover image in editor (#9041)
* Added the cover image upload spinner.

* Fixed skipped test for changing cover image.

* Added tests.
2020-07-01 11:18:26 +02:00
Nick Taylor
efc3a124a0
Added spinner/upload message when uploading an image to a post's content (#8986) 2020-06-30 13:52:47 -04:00
Nick Taylor
30bfe1adfd
More frontend lint fixes (#8931) 2020-06-29 08:19:13 -04:00
Nick Taylor
a7938ed287
Fixed a bunch of linting issues in components (#8921) 2020-06-26 10:26:02 -04:00
Nick Taylor
63b4d9fdc0
More frontend test cleanup (#8919) 2020-06-25 18:04:01 -04:00
Nick Taylor
5bdbc0480d
Some frontend testing cleanup. (#8902) 2020-06-25 09:07:34 -04:00
Nick Taylor
09bb730f9d
Added a11y tests to frontend tests that were missing them (#8873) 2020-06-24 14:38:39 -04:00
Nick Taylor
568ada8fe6
Cleaned up some tests. (#8817) 2020-06-22 10:25:39 +02:00
Nick Taylor
653ec12300
Upgrade to Preact 10.4.4 (#8739)
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
2020-06-18 10:07:17 -04:00
ludwiczakpawel
16f4d7d46a
[deploy] Article Design update (#8234)
* flare tag line height

* .

* init

* widgets

* widgets lists

* new tabs on home

* instantclick

* .

* rethinking css

* .

* .

* empty space

* init

* campaign widget

* .

* merge

* .

* update layout

* fix sidebars on home page

* .

* fix onboarding x

* test

* spec

* test

* toolbar fix

* more

* test

* better handling ads

* .

* spec

* card border

* .

* .

* actions bar

* cleanup

* animation

* test

* button width

* .

* better responsiveness and author boxes

* meta info

* padding

* better animation

* optimize videos

* fixes

* spec

* .

* codeblocks in comments

* whoops

* Use .present? correctly as it preloads items

* sticky nav

* Update app/views/articles/_sticky_nav.html.erb

I don't know what I'm doing but @benhalpern says so! e8c0f337a5 (r440248874)

Co-authored-by: Ben Halpern <bendhalpern@gmail.com>

* Update app/views/articles/show.html.erb

I don't know what I'm doing but @benhalpern says so! e8c0f337a5 (r440247802)

Co-authored-by: Ben Halpern <bendhalpern@gmail.com>

* little fixes

* Update app/assets/stylesheets/article-show.scss

Co-authored-by: Ben Halpern <bendhalpern@gmail.com>

* pawel updating ruby code......

* actually better merge

* semantic updates

* .

Co-authored-by: rhymes <rhymesete@gmail.com>
Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2020-06-17 09:57:57 -04:00
Ben Halpern
e6abadff6c
Generalize editor logo (#8720) 2020-06-17 10:51:50 +02: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
ludwiczakpawel
39295c0bea
Layout updates (#8107)
* flare tag line height

* .

* init

* widgets

* widgets lists

* new tabs on home

* instantclick

* .

* rethinking css

* .

* .

* empty space

* campaign widget

* .

* merge

* .

* update layout

* fix sidebars on home page

* .

* fix onboarding x

* spec

* test

* test

* better handling ads

* .

* spec

* card styling

* .

* i dont know what have i broken
2020-06-04 16:12:17 +02:00
Ben Halpern
5ad7d6ee4e
Update copy on editor help (#8166) 2020-05-30 11:30:35 +02:00
ludwiczakpawel
a161d3ce31
[deploy] Redesign article editor (#7524) 2020-05-29 11:59:37 -04:00
Michael Kohl
7f75f99560
[deploy] Rename classified listings (#7910)
* Change models and related files

* Update controllers and specs

* More renaming

* Seek and destroy, I mean search and replace

* Round up the stragglers

* Ground control to Major Travis...

* More fixes

* PR feedback

* Various fixes

* Rename view

* Fix list query builder

* Unify request specs

* Fix some API spec errors

* Fix remaining API specs

* Make spec conform to API

* Fix leftover problems

* Fix JS tests

* Fix column name in select

* Fix API specs

* Fix search specs

* Paging Mr. Travis
2020-05-27 13:35:09 +00:00
Dmitry Maksyoma
f63c7f9289
Fix Runkit tags not being activated when comment is added (#6767)
* Fix Runkit tags not being activated when comment is added

* Runkit tag activation was ran once, on page load. I've changed it to
  run on on comment preview and submit.
* It was necessary to add a check to skip already activated Runkit
  tags. The code didn't take into account that a tag could be already
  processed, and would just crash.

* Fix Runkit tags and add tests

* Add test for previewing article with Runkit tag

* "Fix CodeClimate not finding waitForRunkitAndActivateTags()

* Refactor a test for readability

* Make Rubocop happy

* Improve test for previewing article with Runkit tag

* Use one method for determining active Runkit tags

* Defer loading of JS from embed.runkit.com

* Add utility function dynamicallyLoadScript(url)

* Switch to dynamic loading of Runkit

* parsed content code block is also hidden now to avoid displaying <code /> block before runkit iframe loads.

* Fix Runkit test

* Remove Runkit script caching in v2 form

* Use <%== instead of .html_safe in v2 form

* Update app/assets/javascripts/utilities/dynamicallyLoadScript.js

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
2020-05-15 14:27:46 +02:00
Aviskar KC
04ff252b87
Fix the height of new post text area and add scrollbar (#7480)
* Repplace preact-textarea-autosize component with textarea element

* FFix the height of new post textarea and add scrollbar

* Update snapshot

* Change the value used to calculate minimum height of text editor to 82vh

Co-authored-by: rhymes <rhymesete@gmail.com>

Co-authored-by: rhymes <rhymesete@gmail.com>
2020-05-14 12:10:37 +02:00
Nick Taylor
7f3c557e7e
fetchSearch now uses @utilities/http/request under the hood now. (#7804) 2020-05-12 16:00:55 -04:00