Commit graph

412 commits

Author SHA1 Message Date
Nick Taylor
4d3278a21e
Created the <ButtonGroup /> Preact Component (#7048)
* Created the <ButtonGroup /> component.

* Removed comment for children proptypes.

* Updated <ButtonGroup /> SB story and tests.
2020-04-03 11:29:24 -04:00
Nick Taylor
d6e5808dec
Created Crayons Button Preact component (#6987)
* wip <Button > component.

* wip button components.

* Fixed issue when icon does not exist.

* Removed subfolder JSX for Preact components in Storybook sidebar.

* Touched up some Storybook stories.

* Now <Button /> component supports a or button for HTML.

* Now the <Button /> component supports the disabled prop

* A nice little refactor.

* Added onClick, onMouseOver, onMouseOut, onFocus and onBlur events to the <Button /> component.

* Set the cursor to default when a <Button /> component is disabled.

* Added tests for <Button /> component.

* Added tests for <SecondaryButton />, <OutlineButton /> and <DangerButton />.

* Updated disabled cursor.

* Removed link href when button is disabled and is an <a />.

* Added the icon alone option for the <Button /> component.

* Now active and hover states are disabled for <Button /> when an HTML button is rendered.

* Now the disabled <Button /> component deactivates hover/active states properly.

* Removed global button hover styling as per @ludwiczakpawel's request.

* Renamed the as prop to tagName.

* Removed components that were wrapping different variants.
2020-04-03 10:49:01 -04:00
rhymes
abca674c15
Remove mutationobserver-shim (#7041) 2020-04-02 15:53:06 -04:00
Molly Struve
7240ccd372
remove user search from chat channel settings (#7015) 2020-04-02 09:13:51 +02:00
jituraj98
e2edf960dc
[deploy] Connect: move settings to sidecar iframe, improve invitations and remove experimental features (#6903)
* 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

* Move channel settings to sidecar

* added spec for chat_channels_memberships_controller.rb (#6539)

* added spec for chat_channels_memberships_controller.rb

* simplified record not found error for membership

* error message formatting updated

* added error key in flash message

Co-authored-by: jitendra <jitendrarajpurohit@skynox.tech>

* Refining "Move sidecar to iframe" branch (#6634)

* added spec for chat_channels_memberships_controller.rb

* simplified record not found error for membership

* error message formatting updated

* added error key in flash message

* 🐞 Bug Fix: Open sidecar of clicking @all

* 🐞 Bug Fix: adding space after selecting the username from suggestion box

* added remove channel member functionality for moderators

* 🔩 Small Tweaks: Hover issue fixed

* 🐞 Bug Fix: Remove sidecar toggle on @all tag (for now)

* updated manually constructed urls with rails path helpers

* mod users cannot remove members of other channel

Co-authored-by: jitendra <jitendrarajpurohit@skynox.tech>

* 🚀 Finalising the connect group/channel feature.  (#6829)

* added spec for chat_channels_memberships_controller.rb

* simplified record not found error for membership

* error message formatting updated

* added error key in flash message

* 🐞 Bug Fix: Open sidecar of clicking @all

* 🐞 Bug Fix: adding space after selecting the username from suggestion box

* added remove channel member functionality for moderators

* 🔩 Small Tweaks: Hover issue fixed

* 🐞 Bug Fix: Remove sidecar toggle on @all tag (for now)

* updated manually constructed urls with rails path helpers

* mod users cannot remove members of other channel

* mod members can now invite user who have left the channel

* 🐞 Bug Fix: Ability to open sidecar on mention all properly

* Eslint Changes

* send email notification on inviting user feature added

* 🛠  Email design enhancements for channel invitation

* send invitation to mod user added from internal

* 🛠  Gif changes for Mod

* spec fixed

* inviter name issue fixed

* 🚀 Open sidecar when automatically if you use link from email

Co-authored-by: jitendra <jitendrarajpurohit@skynox.tech>

* review changes

* added spec for channel_invite_email

* Bug🐞: Design problem with sidecar after merge

* Bug🐞: Design problem with invitation alert box

* replaced instance variables with local variable

* Bug🐞: Wrong css classes fixed

* Bug🐞: Edit option bug

* yarn.lock file updated

* code review changes

* updated manually constructed urls with rails path helpers in spec

* user name url issue fix in invite email

* user url corrected

Co-authored-by: Sarthak Sharma <7lovesharma7@gmail.com>
Co-authored-by: benhalpern <bendhalpern@gmail.com>
2020-04-01 12:13:26 -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
Nick Taylor
f557c9d474
Created preact component for crayons dropdown (#6961)
* Created barrel files so we can import directly from @crayons.

* Added stories for Dropdown for JSX.

* Tweaked Dropdown Storybook stories.

* Tweaked <Dropdown /> component.

* Added module mapping to jest for @crayons.

* Added tests for <Dropdown /> component.

* Removed Storybook custom decorator that is no longer required.
2020-03-31 09:42:21 -04:00
Nick Taylor
5ba10c96a2
Add webpack aliases for Crayons components (#6958)
* Added webpack alias for @crayons.

* Added @crayons to eslint import/no-unresolved rule ignore list.

* Added path mappings for VS Code for webpack aliases.
2020-03-31 07:16:29 -04:00
Ben Halpern
6d6a36f3dd
[deploy] Fix small onboarding issues (#6963)
* Fix small onboarding issues

* Fix whitespace
2020-03-30 20:43:33 -04:00
Lisa Sy
b6fd02b70f
Improve onboarding UI and UX (P1) (#6901)
* Improve onboarding UI and UX (P1)

- Introduce Crayons variables
- Remove unnecessary CSS files to have just one CSS file

* Add new onboarding tests

* Update onboarding yarn test to reflect updated class names
2020-03-30 15:38:15 -07:00
Nick Taylor
e4fdbd1a30
Restructure Storybook stories in sidebar (#6915)
* Renamed designSystem to crayons.

* Restructured how Storybook stories are laid out in Storybook's sidebar.

* wip

* More folder restructuring for Storybook sidebar.

* Fixed Dropdown description story.

* There no longer is a Dropdown for no padding. Just add additional utility classes.

* Showing dropdowns by default in Storybook as they are hidden by default.
2020-03-30 17:26:04 +02:00
Alex
efc08d9b74
[deploy] Add valiation for file name length to file uploads (#6918) 2020-03-27 18:54:27 -04:00
ludwiczakpawel
209c01037a
Crayons'ifizing Header (#6780) [deploy]
* add tons of colors

* add tons of colors

* moving cheese around and prepping for new theming system

* documenting

* .

* moving theme code to own files

* replacing some variables

* whitespaces

* replacing another batch of variables

* get rid of another variable

* replace loading animation variable with one-fits-all-sizes

* get rid of theme-anchor-color

* remove code colors variables

* another batch of variables replaced

* mostly bringing in variables for haxor theme

* remove invert-image variable for chat

* remove another inver-image variable

* forgot to remove reaction-background variable

* remove border variable

* series

* .

* remove another variable

* remove another variable..

* another batch of variables

* and more...

* header updates

* i forgot to commits things in my PR....

* fix border

* .

* simplifyuing placeholder

* responsiveness

* responsive

* search fix

* fixing prefix-less classes

* increase clickable area

* small style updates for pink theme

* tests

* Fix test

* responsive dropdown

* tiny fixes

* generator rewritten

* dropdown reworked a little

* adjustments

* fix pwa

Co-authored-by: rhymes <rhymesete@gmail.com>
2020-03-26 12:21:53 -04:00
Nick Taylor
749ee2a946
Added crayon.scss to Storybook. (#6853) 2020-03-26 12:27:54 +01:00
Nick Taylor
8b82de8118
Replace clearTimeout with clearInterval. (#6820) 2020-03-24 15:55:10 -04:00
Ben Halpern
2c54add4b8
Comment out mishandled imports (#6815) [deploy] 2020-03-24 13:13:48 -04: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
Nick Taylor
52c2f40256
Upgrade Storybook to 5.3.17 (#6754)
* Renabled building Storybook.

* Explicitly added webpack style loaders for Storybook custom webpack config.

* Upgraded Storybook configuration.

* Added mixin/function to handle SASS compilation for Sprockets and Storybook's webpack.

* Readded stylesheets/js required for crayons to run.

* Added a custom title to Storybook.

* Fixed custom Storybook CSS.

* Migrated Search storybook stories.

* Migrated crayons' box stories.

* Migrated crayons' modal stories.

* Migrated crayons' button stories.

* Changed title a bit until we get a logo.

* Migrated crayons' notice stories.

* Migrated crayons' dropdown stories.

* Migrated crayons' indicator stories.

* Migrated crayons' typography stories.

* Migrated crayons' form element stories.

* Migrated crayons' navigation stories.

* Migrated crayons' avatar & logo stories.

* Migrated fatured article stories.

* Migrated article loading stories.

* Migrated today's podcast episodes stories.

* Migrated podcast episode stories.

* Migrated rest of article stories.

* Update app/javascript/.storybook/manager.js

Co-Authored-By: rhymes <rhymesete@gmail.com>

* Commented new SASS function and mixin.

Co-authored-by: rhymes <rhymesete@gmail.com>
2020-03-23 09:46:50 -04:00
Michael Kohl
2d2cc65465
Use correct attribute for rendering tags in listings (#6741) [deploy]
* Use correct attribute for rendering tags in listings

* Update test
2020-03-21 11:46:23 +01:00
Manda Putra
6310dba783
Remove debouncing from Tags component to fix glitching in autocompletion (#6598) [deploy]
* fix: glicth when using writing tags

* Revert "fix: glicth when using writing tags"

This reverts commit f3c7b44b51698921e621dde491aee28477a6d03d.

* fix: glitch when typing uncommon tags
2020-03-20 18:18:05 +01:00
Jacob Herrington
2b442ca8b6
Internal bug fixes and misc JS/CSS cleanup (#6684)
* Remove unused CSS rules

* Use bootstrap utility class over custom css

* Fix grapical bug with buffer tags

* Fix internal UI highlighting and misc fixes

This commit is a little bit too big.

It fixes a bug with the internal UI that was breaking the highlighting
feature (indicates status of articles and when an AJAX request has been
made).

It also does some reformatting in the internal listings UI. This should
make it a bit easier on anyone writing buffer updates in the listings
UI. I was able to reapply some stimulus I wrote previously for this,
super easy!

There are also a couple of CSS classes I renamed to match Bootstrap's
naming conventions.

* Remove <br> tag

* Update article_controller Stimulus test
2020-03-18 16:05:33 -05:00
Ben Halpern
fa494418eb
Fix /connect message composer style bugs (#6695) [deploy] 2020-03-18 11:19:04 -04:00
Ben Halpern
0a1c6fe82f
Adjust tag rendering (#6689) [deploy] 2020-03-17 22:45:29 -04:00
Ben Halpern
e977f4c357
Fix homepage back button flicker (#6688) [deploy]
* Fix homepage back button flicker

* Update tags
2020-03-17 22:40:49 -04:00
Nick Taylor
ccf7e6e5bf
Upgrade to webpacker/webpack 4 and Babel 7 (#6664)
Upgraded to webpacker 4/webpack 4 and Babel 7
2020-03-17 08:20:36 -04:00
narender2031
c913197fac
fix cannot read privacy policy redirect to onboarding (#6636) 2020-03-16 08:53:32 -04:00
Molly Struve
a4ce1625e3
Search Users for Chat Channels Frontend (#6626)
* hook up user search for chat channels to Elasticsearch

* Add spaces

* run specs

* add more spaces

* reset travis file

* add another data upadte script to reindex Users
2020-03-13 10:26:32 -04:00
Michael Kohl
244ab297c8
Move user following suggestions to internal API (#6601) [deploy] 2020-03-13 13:37:24 +01:00
Nick Taylor
da89b9854e
Nickytonline/changed grouping of components in storybook (#6613) [deploy]
* Renamed Components Storybook grouping to App Components.

* Design system components are now grouped under Components in Storybook.

* Split up Typography stories.
2020-03-12 17:42:24 -04:00
Nick Taylor
7bd99ad2da
Nickytonline/add crayons to storybook (#6578)
Added crayons (design system) to Storybook
2020-03-12 15:00:32 -04:00
Andy Zhao
45a17d5c09
Fix group chat channel details panel (#6599) 2020-03-11 18:23:45 -04:00
Nick Taylor
5253ccaa75
Fixed centering of Storybook display area. (#6594) 2020-03-11 15:23:22 -04:00
Gonzalo Ricco
c8be3f4cc1
Keep old listings visible until the new ones populated (#6577) 2020-03-11 16:53:53 +01:00
Michael Kohl
f975c4c9f3
Move chat_channel info to internal API (#6581) [deploy] 2020-03-11 13:57:21 +01:00
Faruk Talha Özbek
9c3868a33e
fixed some eslint errors (#6521)
* fixed some eslint errors

* changed async/await  to then/catch

* Added Honeybadger inside the catch block

* removed Honeybadger import and addes eslint global rule
2020-03-10 18:49:57 +01:00
Juan Vasquez
d461d83540
Fixed listings/dashboard/rowElements/location.jsx eslint error (#6491)
* Fixed listings/dashboard/rowElements/location.jsx eslint error

* Update app/javascript/listings/dashboard/rowElements/location.jsx

Co-Authored-By: Nick Taylor <nick@iamdeveloper.com>

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
2020-03-09 17:39:22 -04:00
Vaidehi Joshi
a66dc2693a
Refactor debounce usage into debounceAction util (#6506)
* Refactor debounce usage into debounceAction util

* Allow debounceAction's config to be merged, allow for named arguments

Also clean up the documentation as necessary!
2020-03-09 17:38:39 -04:00
Faruk Talha Özbek
063efff5f6
fixed some eslint errors (#6476) 2020-03-06 20:03:49 +01:00
Michael Kohl
8df0a72ce7
Move onboarding tags from public to internal API (#6329)
* Move onboarding tags from public to internal API

* Fix typo

* Undo wrong chang
2020-03-06 19:34:31 +01:00
Juan Vasquez
6c610fc979
Fixed app/javascript/chat/channels.jsx eslint error (#6492) 2020-03-06 08:39:09 -05: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
Alex
c3cc395809
Now reactions count are always shown. (#6456) [deploy] 2020-03-04 10:43:57 -08:00
rhymes
196ac20669
Fix tags autocomplete deleting input with fast typing (#6448) [deploy] 2020-03-04 17:41:12 +01:00
Nick Taylor
a5aa50f758
Removed file for feed that is no longer used. (#6446) 2020-03-04 09:13:10 -06:00
Alex
832f59ff6d
Search ClassifiedListings frontend code (#6372) [deploy]
* Add /search/classified_listings route

* Add classified_listings search controller action

* Add spec for /search/classified_listings request

* Begin implementing frontend code

* Add debounce to classified_listings search

* before_action to format page & per_page as Integer

* Use new fetchSearch helper to fix codeclimate

* Refactor to reduce listingSearch function length

* Refactor into separate updateListings function

* Move updateListings function outside class

* Move page size to constant

* Add brackets to conditionals

* Add comment for tags param

* Add JS doc

* Move params logic/cleanup to search_controller

* Move listingIDs to const

* Rename remove_blank_params & move to before_action
2020-03-03 14:13:40 -08:00
Michel
f875f9b4b2
Fix invalid ERB in featured author link. (#6428) [deploy] 2020-03-03 14:43:19 -05:00
Ben Halpern
3875f38b26
Remove console log (#6424) 2020-03-03 19:39:51 +01:00
Alex
9888021408
Create fetchSearch helper (#6374)
* Create fetchSearchAPIPromise helper

* Add comments/documentation

* Add test for fetchSearchAPIPromise helper

* Rename fetchSearchAPIPromise to fetchSearch

* Update fetchSearch documentation

Co-Authored-By: Vaidehi Joshi <vaidehi.sj@gmail.com>

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
2020-03-03 09:52:24 -05:00
Molly Struve
a0c0e7c7e3
remove leftover algolia test code (#6409) [deploy] 2020-03-02 13:58:13 -05:00