Commit graph

515 commits

Author SHA1 Message Date
Nick Taylor
530b13e8c7
made all frontend unit tests uniform by preffering it(...) over test(...) (#8113) 2020-05-28 17:18:15 +02:00
rhymes
eb355a6d4c
Fix broken tag filters in listings (#8086) 2020-05-28 10:24:50 +02:00
Nick Taylor
c83cad6fb6
Sorting Storybook stories (#8058)
* Added story sorting to Storybook.

* Added design system guidelines.

* Made Base in Storybook tree 2nd in the tree view.

* Now Components are 3rd in the treeview of Storybook.

* Now App Components are 4th in the treeview of Storybook.

* Froze node version to 12.16.0

* Revert "Froze node version to 12.16.0"

This reverts commit 093b119c7d7ca05ecb4e1c0234b24bcf8e7b10a4.
2020-05-27 13:10:16 -04:00
Nick Taylor
26c66b34d2
Fixed configuration to build Storybook on Netlify. (#8088) 2020-05-27 12:44:30 -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
Andy Zhao
c42fd3461e
[deploy] Rename positive_reactions_count to public_reactions_count in logic (#7926)
* Rename positive_reactions_count to public_reactions_count

* Add positive reactions count back in so we can remove it

* Use public_category method for reactions

* Add positive_reactions_count in case any old caches rely on it

* Add positive_rxn_count to account for API endpoints

* Remove unused method

* One more spot...

* Add method back in because of caches

* Update specs to match new functionality

* Fix typo

* Remove unused methods
2020-05-26 12:36:28 -04:00
Nick Taylor
412f640cb7
Added a search form Storybook story where the search is focused. (#7968) 2020-05-19 17:59:46 -04:00
Andy Zhao
d2d8caa767
[deploy] Use npm for deploying Storybook (#7969) 2020-05-19 17:41:41 -04:00
Andy Zhao
1cc95e03a3
Add netlify.toml for storybook (#7963) 2020-05-19 16:10:33 -04:00
Nick Taylor
c36f034542
Fixed a copy pasta error in a Storybook story (#7962) 2020-05-19 15:51:17 -04:00
Vaidehi Joshi
3b9fe2658e
Fix pluralization in FollowUsers component (#7928) [deploy] 2020-05-18 11:38:47 -07:00
Nick Taylor
8f81d8ce52
Fixed article stories in Storybook (#7884) 2020-05-15 13:08:02 -04:00
Nick Taylor
ceb40d2c75
Removed the app/javascript/src folder (#7888) 2020-05-15 11:50:36 -04:00
Nick Taylor
b376d109ef
Moved src/components/Item* to readingList/components (#7876) 2020-05-15 11:00:06 -04:00
Nick Taylor
03ff779ca3
Moved src/utils out of src/ folder to utilities/ folder. (#7875) 2020-05-15 10:07:42 -04: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
Rafi
be3d977565
Sanitizing and rendering html entities in article title (#7593) 2020-05-15 08:04:43 -04:00
Ben Halpern
0ae835c73f
Open in new window properly on ctrl+click etc (#7814)
* Open in new window properly on ctrl+click etc

* Trigger meta click for comment area too
2020-05-15 14:02:11 +02:00
Nick Taylor
be5f80a04b
Moved common-prop-types out of src/ folder (#7871) 2020-05-14 16:58:29 -04:00
Nick Taylor
26cf4085fc
Moved search components our of src/ folder. (#7869) 2020-05-14 16:45:41 -04:00
Andy Zhao
22cdbcbd38
[deploy] Return boolean value instead of undefined for listings open modal (#7854)
* Return a boolean value not undefined

* Fix typo
2020-05-14 13:10:55 -04: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
f21f4958bd
Added tests. (#7823) 2020-05-13 11:02:56 -04:00
ludwiczakpawel
3110743e36
Video cover (#7821)
* flare tag line height

* .

* .
2020-05-13 16:17:59 +02:00
Ben Halpern
f2f90e98b3
Fix connect runtime error (#7812) 2020-05-13 08:09:24 -04:00
Mac Siri
19056dc9ed
Remove hard-coded published_at_int (#7809) 2020-05-12 17:31:28 -04:00
Vaidehi Joshi
4133efbd20
Update Article snapshots (#7807) [deploy] 2020-05-12 14:01:07 -07:00
Nick Taylor
7f3c557e7e
fetchSearch now uses @utilities/http/request under the hood now. (#7804) 2020-05-12 16:00:55 -04:00
Ben Halpern
49a438f4ec
[deploy] Adjust overflow in comments and revert inline css (#7799)
* Adjust overflow in comments and revert inline css

* Fix color
2020-05-12 12:42:49 -04:00
Ben Halpern
4620eaa512
[deploy] Fix podcast styling (#7796) 2020-05-12 11:23:00 -04:00
Nick Taylor
0300dadd19
Removed feedIcons.js.erb as the file is no longer being used. (#7788) 2020-05-12 09:35:55 -04:00
Josh Puetz
2abe830377
[deploy] Home Page Feed redesign + top comments (#7579)
* feed cards

* frontend

* preactify

* preactify

* .

* fix

* fixing things and adding dropdown

* whoops.

* whoops 2.

* revert body bg color change

* search snippet

* search snippet

* get rid of featured article

* get rid of featured article...

* cover to its own component

* videos

* videos

* reading time

* small-save-filled asset

* author adjustments

* adjustments

* Author --> Meta

* whoops.

* loader

* logged out state

* .

* dropping what's not needed for now

* better name for cover

* get rid of nav overflow

* bringin comments placeholder back

* bringing comments placeholder back

* publish date

* fix

* date

* .

* save button icon

* ghost button

* lets skip the icon for saving for now

* more buttons

* counting logic

* Display top comments on homepage feed

* Comment list and item components

* Remove 'Top Comments' title

* Remove subscribe button, add reading time

* Update snapshots and tests

* Fix article and follower scrolling

* Added reading time

* (Try) to do flare tags

* Button component from Pawel

* More button styles from Pawel

* Comment count style from Pawel

* Handle empty parens for age on older articles

* Dont show 'more comment' button for more than 2 comments

* cover ratio

* flare tag

* cover fix

* fix buttons

* more button fixes

* tags fix

* responsiveness fix

* reading time  + a bit of responsiveness

* Reading time in more places

* snapshots

* default color for flare tag

* Update CommentsList test snapshot with new styles

* fixing search results

* fixing buttons

* Fix podcast card tests by updating snapshots

* Line clamping for top comments

* Reflect save button state after click before mouseout

* Now the entire feed card is clickable. (#7638)

* Now pointer cursor is only on feed posts. (#7727)

* Revert podcast card styling

* Update test snapshot

* merge

* Fix rspec on feed page

* Reduce complexity of class check for feed card clicking

* PR feedback/fixes

* Fix featured article test and snapshot

* Last minute test tweaks

* clean up crayons

* padding issue + empty div

* Correct merge error

* Fix search results tests

* Test fixes and snapshot updates

* themes

* podcasts colors

Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com>
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
2020-05-12 07:57:57 -05:00
rhymes
81fff248dd
Refactoring GitHub Repos functionality - step 1 (#7764)
* Rename find_or_create to upsert and improve validation and testing

* Add User.authenticated_through?

* Refactor settings/integrations

* Refactor profile github repositories rendering

* Refactor repos fetching

* Only fetch a single repo and improve error messages

* Remove unused code

* Cleanups

* Fix specs

* Remove trailing whitespace

* Fix spec

* Trigger Travis
2020-05-12 13:48:19 +02:00
Juliano Pereira Lima
18531f34cd
Refactor listings/listings.jsx (#6992) 2020-05-11 14:42:55 -04:00
Sarthak Sharma
90d60bf73f
[deploy] 🚀 Feature: Ability to search discoverable channels and send request to join (#7385)
* 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

* added new column discoverable for public channel and changes in elasticsearch

* fix corrections

* changes in serializer file, added channel_discoverable

* added checkbox with discoverable policy

* changes in code for discoverable channels

* accept and reject member invitation by mod

* add joining request to closed groups

* fixed merge error

* changes in joining member to closed groups

* join to closed group

* changes in message action of joining

* changes in chat upopened json

* 🚀Feature : Ability to search Global Channels

* touch updated_at in after commit update

* 🚀Feature : Ability to send request to discoverable channel

* 🚀Feature : Ability to send request to discoverable channel

* created new route for joining closed channel

* 🚀 Success handle on joining request sent

* removed redundant code

* join_channel improvement, removed authorization for join channel

* list of joining requests

* added joining_request status channels on search list

* changes in mailer and query builder optimized

* 🛠 Adding filter for new Query

* added rspec for add membership method in controller

* rspec for sending join channel request

* invite join request channel list rspec

* test case for query builder discoverable

* viewable and discoverable channel list

* refactored logic for search channels

* 🚀 Check if Request already sent

* 🛠 Optimizing code and making channelButton Component

* 🛠 Optimizing codefor SVG problem

* 🛠 Optimized action.js

* changes in search controller query

* hot fix

* removed unwanted code

* 🛠  Fix the Channel Name problem

* 🛠  Optimizing code further for CodeClimate

* added new column discoverable for public channel and changes in elasticsearch

* fix corrections

* changes in serializer file, added channel_discoverable

* added checkbox with discoverable policy

* changes in code for discoverable channels

* accept and reject member invitation by mod

* add joining request to closed groups

* fixed merge error

* changes in joining member to closed groups

* join to closed group

* changes in message action of joining

* changes in chat upopened json

* touch updated_at in after commit update

* 🚀Feature : Ability to search Global Channels

* 🚀Feature : Ability to send request to discoverable channel

* 🚀Feature : Ability to send request to discoverable channel

* created new route for joining closed channel

* 🚀 Success handle on joining request sent

* removed redundant code

* join_channel improvement, removed authorization for join channel

* list of joining requests

* added joining_request status channels on search list

* changes in mailer and query builder optimized

* added rspec for add membership method in controller

* rspec for sending join channel request

* invite join request channel list rspec

* 🛠 Adding filter for new Query

* test case for query builder discoverable

* viewable and discoverable channel list

* refactored logic for search channels

* 🚀 Check if Request already sent

* 🛠 Optimizing code and making channelButton Component

* 🛠 Optimizing codefor SVG problem

* 🛠 Optimized action.js

* changes in search controller query

* hot fix

* 🛠  Fix the Channel Name problem

* 🛠  Fixing merge problem

* 🛠  Optimizing code further for CodeClimate

* updated UI for membership edit

* fixed test casses and fixed UI for chat_channel_edit

* 🛠napshots added

* test cases fixed

* 🛠 Test cases added for new component

* channel settings accesible only by mod

* 🛠 More Test cases added

* 🛠 Svg code optimized

* 🛠 Svg code optimized in videocontent

* optimized code for search query

* fix test case for query builder

* changes in joining closed channel logic

* refactored join channel

* redirect to edit channel after joining request

* changes in test case for redirect

* optimized code

* 🛠 Eslint bugs fixed

* test case fixed

* optimization

* olving channel repetition problem

* optimization of code for query builder

* changes in query builder

* test cases fixed

* 🛠 Handling reduntant data on frontend

* 🛠  Don't show data if no filter query

* 🛠 Optimized code for fixing bugs and code coverage

* 🛠  Optimizing code further for CodeClimate

Co-authored-by: Parasgr-code <paras.gaur@skynox.tech>
2020-05-11 09:29:15 -04:00
Ben Halpern
4eb2f05387
[deploy] Add generalized community name and description to onboarding slides (#7725)
* Comment out redirect

* Back to where we were

* Add basic generalization to onboarding

* Update app/javascript/onboarding/Onboarding.jsx

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

* Update app/javascript/onboarding/components/IntroSlide.jsx

* Update app/javascript/onboarding/components/ProfileForm.jsx

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
2020-05-08 14:45:24 -04:00
ludwiczakpawel
2d9ff805ba
[deploy] Onboarding fix for mobile (#7732)
* fix

* snapshot
2020-05-07 20:05:40 -04:00
Mac Siri
8fcec7ead4
Unescape user's summary in followUser slide (#7675) 2020-05-06 12:14:05 -04:00
ludwiczakpawel
b1bcf2ed9b
Adding tabIndex prop to Buttons component (#7694)
* tabindex

* Added a test for tabIndex.

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
2020-05-06 15:40:09 +02:00
Nick Taylor
a71d78df6e
[deploy] Add comment subscription component to article page (#7205)
* wip

* Right aligned the comment subscription panel.

* Cleaned up the comment area on the article page so it uses crayon margin classes.

* Updated tests

* Removed old UI for comment subscriptions.

* Made Discussion text bigger and bolder.

* Fixed some layout issues as per PR comments.

* Fixed some layout issues as per PR comments.

* Updated Storybook stories, tests and snapshots

* wip

* Everything works now, just need to integrate snackbar.

* Removed setTimeout I was debugging with.

* Using the new utilities/http/request utility now.

* Added the <SnackbarPoller />

* Now when unsubscribed, the subscription type resets to all comments.

* Removed overflow hidden from .home CSS class so comment subscription component displays properly.

* Now unsuccessful subscribes/unsubscribes error properly.

* Changed button text from Done to Subscribe

* Merged the <SnackbarPoller /> component into the <Snackbar /> component.

* Fixed a propType issue.

* Fixed a test.

* Removed snackbar tests for now. Need to figure out polling in tests.

* Now comment subscription component is only loaded for logged on users.

* Added a comment.

* Updated some storybook stories.

* Fixed a small formatting issue.

* Reduced snackbar item lifespans to 3 seconds.

* Extracted <CogIcon /> to it's own file because other features are going to need it.

* Added some Storybook stories and tests for the <CogIcon /> component.

* Revert "Extracted <CogIcon /> to it's own file because other features are going to need it."

This reverts commit b30406a50e491c53c3dce5be03bcdf8112b043df.

* Put back <CogIcon /> component.

* Added some error handling if the component doesn't load.

* Moving some things around.

* Rename the article pack file.

* Changed wording from "article" to "post".

* Fixed false negative CSS issue. It was a dangling div tag.

* Add the option to add an optional close button to snackbar items.

* Fixed z-index of subscription type options panel so it is always visible on mobile.

* Reworked the comment subsciption utilities a bit.

* Added test for comment subscription utilities.

* Fixed a broken test from a refactor.

* Added more tests for comment subscription utiltities.

* Fixed comments footer bottom padding.

* Fixed issue with stale find in comment subscription test.

* Update app/javascript/packs/articlePage.jsx

Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com>

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

Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com>

* Changed close button wording to Dismiss.

* Fixed padding to use utility variable instead.

* Added missing import for SASS file.

Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com>
2020-05-05 12:50:30 -04:00
ludwiczakpawel
9ddac632e4
Modals (#7603)
* wip

* no comment

* tests

* typo

* typo

* crayons example page

* doc

* boxes fix

* fix

* Update index.html.erb

* Small refactor to return null when the modal is not visible.

* Update app/assets/stylesheets/components/modals.scss

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

* tiny fixes & improvements

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
2020-05-05 15:33:17 +02:00
Nick Taylor
ddf6a06bc2
Fixed a typo in a a folder name. (#7671) 2020-05-04 13:53:43 -04:00
ludwiczakpawel
2ad5403045
Boxes coloring fix (#7656)
* boxes fix

* fix
2020-05-04 08:42:11 -04:00
Molly Struve
4c779be2ed
[deploy] Remove ALL Algolia Code (#7577) 2020-04-29 10:11:57 -05:00
Maja Komel
f210ef9f67
[deploy] Remove correct tag when deselecting on listings page (#7530) 2020-04-28 18:27:58 -04:00
Sai Bhargav
2d20d67594
[deploy] Fix listing tags bug (#7533)
* Fix listing tags bug

* Fix failing specs

* Fix failing specs

* Fix failig spec

* Fix failing specs

* Refactor code

* Fix failing specs

* Support AND/OR queries based on params

* Add tag_boolean to search params
2020-04-28 16:04:09 +02:00
Ben Halpern
618c3b5c75
[deploy] Add codenames proof-of-concept to /connect (#7553) 2020-04-27 19:19:12 -04:00
Mac Siri
f4000a1809
[deploy] Render onboarding on small screens correctly (#7548) 2020-04-27 16:16:33 -04:00
Andy Zhao
fded16b8dc
[deploy] Add a more helpful msg for response templates (#7543) 2020-04-27 13:28:28 -04:00
Ridhwana
b9a8d87e95
[deploy] Refactor to create a helper for the mailer links (#7502)
* refactor: set the email_from to use in teh defaults

* chore: remove some new lines

* feat: add a mail link helper that can be used in the views

* feat: returns the default if it doesn't understand the parameter

* feat: Quick replacement of links

* feat: allow subject to be passed through

* chore: update all hrefs

* chore: remove rel attribute

* chore: mail link

* update spec

* chore: space

* chore: update some whitespaces and emails

* style

* chore: PR mail_link to email_link and the comment

* feat: PR suggestions for encoding

* feat: use mail_to
2020-04-27 09:18:16 -04:00