Commit graph

874 commits

Author SHA1 Message Date
dependabot[bot]
62e150f5af
Bump eslint-config-preact from 1.1.3 to 1.1.4 (#13516)
* Bump eslint-config-preact from 1.1.3 to 1.1.4

Bumps [eslint-config-preact](https://github.com/preactjs/eslint-config-preact) from 1.1.3 to 1.1.4.
- [Release notes](https://github.com/preactjs/eslint-config-preact/releases)
- [Commits](https://github.com/preactjs/eslint-config-preact/compare/v1.1.3...v1.1.4)

Signed-off-by: dependabot[bot] <support@github.com>

* Add missing key prop for elements in iterators where necessary

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
2021-04-27 18:54:43 +02:00
Suzanne Aitchison
7c7a0992b7
Reintroduce autocomplete Cypress test, refactor tests in same suite (#13506)
* reintroduce test, refactor tests

* make sure we always wait for comment box substitution before continuing
2021-04-27 12:01:51 +01:00
Ridhwana
c5bcb4c021
RFC 50: fix some more hardcoded paths (#13473)
* fix: remove hardcoded paths

* fix: use path helpers

* swap href for link_to

* feat: use path helpers

* feat: use a data path to send through the path that we will be calling

* feat: pass route through to js

* dus index path

* chore: change to use path_helpers

* feat: update DUS controller

* chore: oops remove these paths
2021-04-26 17:49:54 +02:00
Jacob Herrington
2f703e97f3
Fix bug when responding to listings (#13366)
* Fix bug when responding to listings

Sending a message to a listing author works about half the time. I
can't determine exactly what user behavior causes it to fail or succeed,
but after making this change it doesn't fail anymore. Looking at the
code, I'm not sure how it ever works...

* Notify Honeybadger when listing responses fail

* Add E2E test for contacting through listings

* Update e2e test
2021-04-23 13:55:33 -05:00
Nick Taylor
90da6355dd
[15 minute fix] Fixed issue with member navigation button only working after full page loads but not InstantClick page transitions (#13402) 2021-04-23 08:06:56 -04:00
Fernando Valverde
8b4e6ba91b
[Small fix] Makes stats page responsive (#13345)
* Small UI refactor that makes the stats page resonsive (to some degree)

* Add import to scss file

* Whoops

* Implement feedback from review

* Extract flex value into variable

* Update app/javascript/analytics/dashboard.js

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2021-04-14 14:57:35 -06:00
Suzanne Aitchison
2998cb4555
remove extra key handler on archive button (#13392) 2021-04-14 13:34:47 +01:00
Suzanne Aitchison
94bca23f07
Switch from combobox to plaintextArea on click outside (#13333)
* switch back to plaintextArea on click outside

* add a test for click outside

* restore plainTextArea on blur, add cypress test
2021-04-14 09:15:26 +01:00
Hariharan Sampath
208d788672
Fix feed navigation shortcuts when first article is not 100% visible (#11874)
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
Co-authored-by: Hariharan <hariharan.s@samsung.com>
2021-04-13 22:35:50 -04:00
Nick Taylor
2b13b9a593
[15 minute fix] Cleanup of post preview E2E tests (#13376) 2021-04-13 10:56:24 -04:00
Andy Zhao
7b119057b3
[15-min-fix] Fix removing cover img from v2 editor and dashboard link (#13227)
* Navigate back to dashboard instead of article.path

* Set mainImage to null to remove image properly

* Use dashboard_path over string path

Co-authored-by: Michael Kohl <me@citizen428.net>

* Handle apostrophe edge cases

* Allow main image to be set

* Add new test for removing article cover img

* Use potentially less flaky find

* Use findByAltText instead of get

Co-authored-by: Michael Kohl <me@citizen428.net>
2021-04-12 09:34:30 -04:00
Suzanne Aitchison
458e3fbc7a
make sure all text area heights stay in step (#13341) 2021-04-12 10:34:21 +01:00
Michael Kohl
5406b0576e
Split Settings::Authentication from SiteConfig (#13095)
* Split Settings::Authentication from SiteConfig

* Move specs

* Sort fields

* Update settings usages

* Update recaptcha usages

* Add data update script

* Update spec

* Rename SiteConfigParams concern

* Fixes, new route, new controller

* Controller and service refactoring

* More controller and service updates

* Spec updates

* More spec fixes

* Move file

* Fix FeedbackMessagesController

* Update admin/configs_spec

* Fix remaining specs in admin/configs_spec

* Fix configs API

* Formatting

* Clean up old service object

* Various fixes

* Update DUS

* Add model argument to admin_config_label

* Fix key name

* Fix specs

* Add distinct request caches for settings classes

* Fix e2e tests

* Fix remaining system spec

* Make DUS idempotent

* Move routes block

* Cleanup

* Switch to ActiveSupport::CurrentAttributes

* Pinned rails-settings-cached

* Update e2e test

* Update lib/data_update_scripts/20210316091354_move_authentication_settings.rb

Co-authored-by: rhymes <rhymes@hey.com>

* Add guard to DUS

* Temporarily re-add two SiteConfig fields

* Fix config show view

Co-authored-by: rhymes <rhymes@hey.com>
2021-04-12 09:41:09 +02:00
Nick Taylor
37d7cdbef7
Now the load more button only appears (if necessary) when the reading list is finished loading. (#13327) 2021-04-09 10:17:52 +02:00
Nick Taylor
86deddbb75
Fixed Reading List on Mobile + Small Improvements (#12755)
* Some div soup to semantic markup.

* Small refactor to inline mapping of available tags.

* Renamed <ItemListTags /> component to <TagList />.

* Now a select is used for picking a tag to filter on.

* Added custom Cypress command to create an article.

* Added documentation for the create article custom command.

* Removed unnecesary properties from payload to create an article.

* reading list mobile view wip.

* Reworked styles in <TagList />.

* Reworked reading list to use <MediaQuery /> component.

* Removed bottom padding from reading list header.

* styling tweaks if there are no available tags.

* Added some E2E tests.

* Removed reading list component test in favour of e2e test.

* Made breakpoint values numbers.

* Added some padding and more grid gap to filter on small screens.

* Adjusted jest coverage thresholds as we're moving some tests to e2e tests.

* Reverting a VS Code setting change caused by one of my extensions.

* First pass for E2E tests for the reading list.

* Added some more grid gap.

* Fixed load next page to send tags properly.

* Added some more tests.

* Improved label and placeholder for text filter in reading list.

* Added more tests

* Fixed media queries so it works in Chrome as well.

* Removed aside as tag filters are not complimentary information.

* Update app/javascript/readingList/components/TagList.jsx

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update docs/tests/e2e-tests.md

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Turned off deprecated rule in jsx-a11y eslint plugin.

* Reverted to links instead of radio buttons.

* Added an all tags link and select option.

* Fixed relayout issue.

* Fixed View Archive button size.

* Fixed styling of the load more button.

* Fixed empty list issue toggling between archive and reading list.

* Fixed request changes from PR review.

* Removed CSS change that is no longer required.

* Trigger Build

* Fixed centering of items in top fieldset.

* Fixed issue with search text field resetting reading list.

* Fixed component tests for the reading list.

* Fixed empty state popping up between search queries.

* Fixed casing of fixture filenames.

* Update app/javascript/readingList/readingList.jsx

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Reverted change in reading list component test.

* Added missing JSDoc comment.

* Now links are in an unordered list.

* Promoted some CSS classes from the <nav /> to the <ul /> for spacing.

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2021-04-08 12:53:43 +01:00
dependabot[bot]
1522b6d41e
Bump chart.js from 2.9.4 to 3.0.2 (#13244)
* Bump chart.js from 2.9.4 to 3.0.2

Bumps [chart.js](https://github.com/chartjs/Chart.js) from 2.9.4 to 3.0.2.
- [Release notes](https://github.com/chartjs/Chart.js/releases)
- [Commits](https://github.com/chartjs/Chart.js/compare/v2.9.4...v3.0.2)

Signed-off-by: dependabot[bot] <support@github.com>

* fix issues in migration to 3x of chart.js

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2021-04-08 10:46:32 +02:00
Daniel Uber
68867e7c68
Ensure we have current user information before deciding how to handle the "flag user" button (#13279)
* Make test fail again

Minimal reproduction via `rspec
spec/system/user/trusted_user_flags_user_spec.rb --order=random
--seed=9374` which runs in this order:

- when signed in as a trusted user
- when not logged in
- when signed in as the non-trusted user
- when signed in as the user

Because "not logged in" immediately precedes "non-trusted user" in this
order, the browser store cache is cleared and there is no user. Since
there's no user, the flag is not removed.

* Wait for current user promise before processing current user

* Extract button callback registration to function

This addresses a code climate concern (function exceeded 50 lines) by
extracting the button behavior to a function of (button, id, name),
and calls that within the exported initFlag function.

* Prefer request to fetch

Addresses feedback to use @utilities/http's request method in  place
of fetch (which automatically adds the needed csrf headers)

* Reorder imports

Satisfies code climate report that imports are out of order

* Add honeybadger notify to error handling

Do more than just notify that something went wrong. Notify honeybadger
on failure to flag/unflag a user.

* Remove temp variable

This makes the notify code look more like the suggestion

* Reduce function arglist

Since the user id and name are properties of the flagButton's dataset,
we can efficiently extract them from the flagButton.

Only pull user id from dataset to check if current user = profile
user, and extract id and name from dataset after passing the
flagButton.

* reorder imports

Not sure how I managed to reverse this in 18aeb675b but here we go again

* Test button behavior

The original tests only asserted that the link to reactions was
present and labeled correctly. Add additional check that we can use
the button and that the label toggling occurs (this adds a request to
the test case, but adds a test for user facing behavior).

* Tame eslint check

I was getting conflicting feedback on import ordering from code
climate and eslint. Since telling eslint to ignore its rules was
immediately clear to me (there's an example on the line before this)
that's the direction I headed, but I can revisit if it matters

https://github.com/forem/forem/pull/13279#issuecomment-814411401
captures the conflict (code climate wants @utilities/http first,
eslint wants ../chat/util first, one or the other fails regardless of
the ordering.

* Use multiple rules in one ignore comment

https://eslint.org/docs/user-guide/configuring/rules#disabling-rules
supports multiple warnings separated by commas

* Remove stray comment

* Move documentation comment to the code it describes

* Replace invalid name

I had copied from the suggested code snippet the
userData.profileUserID name, but userData in this context is a global
function, and `profileUserId` (capitalization) is the bound variable
in this context.

Fix it before we throw an error trying to report an error (ironically,
before the window alert telling the user an error occurred, I think
this would have been visible only in console).

* Actually call the remove button function
2021-04-07 16:28:21 -05:00
Jamie Gaskins
c2b7f0b096
Use 2-digit month and day for JS Date class (#13257)
Single-digit months and days are not compliant with the ECMAScript
standard for date strings.

See: https://262.ecma-international.org/11.0/#sec-date-time-string-format
2021-04-07 14:25:39 -04:00
Andrew Bone
6aae404c54
Update Analytics Dashboard time navigation to tabs (#13270)
* Move to crayons-tabs

* Update js logic to use crayon-tabs

* Remove toggle and add tab

The added code moved the tabs to the right hand side of the container (until mobile styles kick in then it will fill the container).
2021-04-07 14:11:15 +01:00
Nick Taylor
b34db2360e
Fixed bug with iOS devices that crashed the post editor (#13281) 2021-04-07 05:52:17 -04:00
Alex
3891c7d468
✂️ Remove search from Connect (#13235)
* Remove search from connect

* Remove alternate approach

* Alphabetize CHAT_CHANNEL_PARAMS

* Remove default value for user_ids

* Add spec for result ordering
2021-04-06 13:03:31 -04:00
Suzanne Aitchison
aa22266e9d
[15 min fix] Allow resize hook to contrain max-height as well as min (#13269)
* allow resize hook to contrain max-height as well as min

* trigger checks
2021-04-06 12:11:03 +01:00
Suzanne Aitchison
100910a072
[15 min fix] ✂️✂️✂️ Remove preact-textarea-autosize library ✂️✂️✂️ (#13234)
* remove lib from title component, use hook instead

* remove lib from chat compose, and remove package
2021-04-05 09:23:29 +01:00
Michael Kohl
28e38cbb7d
Add flag link to profile dropdown view (#12862)
* Add flag link to profile dropdown view

* Add JS for flag button on profile

* Only show flag button to trusted users

* Quick fix for accidental unflagging

This will be more properly addressed in a future refactoring.

* Update reaction specs

* Update spec

* Make flagging togglable

* Make CodeClimate happy

* Revert accidentally changed file

* CodeClimate

* Update app/javascript/profileDropdown/flagButton.js

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

* Add JSDoc

* Remove second popup

* Refactor and add system spec

* CodeClimate

* Change send to public_send

* Address PR feedback by @aitchiss

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
2021-04-01 09:26:43 +00:00
Suzanne Aitchison
6f057fc8ce
Add mention autocomplete to posts (#13101)
* WIP - initial exploration into post mentioon autocomplete

* replace the autosize textarea with mention autocomplete, adjusting height

* add cypress tests for mentioning in a post

* fix resizing of text areas

* refactor text area resize hook

* refactoring

* update cypress tests

* remove mergeRefs from utils, extract UserListItemContent

* allow useTextAreaAutoResize elements to have height greater than minimum, apply styles to container

* Trigger Travis CI

* Travis plz

* small refactors

* add comments and constants as per PR feedback

Co-authored-by: Nick Taylor <nick@dev.to>
2021-03-31 14:42:59 +01:00
Vaidehi Joshi
95055b2a89
Remove pro role + expose analytics to all users via dashboard (#13156)
* Remove pro role on user, expose pro dashboard to all users as analytics

* Remove pro from Elasticsearch mappings

* Update user role docs to use :trusted over :pro

* Remove pro from Role model spec

* Remove more references to pro, as noted by @rhymes
2021-03-30 15:02:18 -07:00
Suzanne Aitchison
7af30e8bfc
reinstate reply to comment e2e test (#13181)
* reinstate reply to comment e2e test

* refactor selector for reply comment box

* refactor and remove data testid no longer needed
2021-03-30 16:31:07 +01:00
Nick Taylor
71d7be16b8
[15 minute fix] Now mention auto-complete dynamic imports are cached. (#13146)
* Now mention auto-complete dynamic imports are cached.

* Removed explicit setting of undefined.

* Put back setting window.Forem.mentionAutoCompleteImports to undefined to be explicit.
2021-03-30 13:20:15 +02:00
Nick Taylor
871650053c
[15 minute fix] Fixed bug with templates not being inserted for comments. (#13149)
* Fixed bug with templates not being inserted for comments.

* Removed some trailing white space from a heading.

* Added custom Cypress command to create an article.

* Added E2E tests for creating comments on an article.

* Fixed adding a comment issue caused by mention auto-complete.

* Fixed a selector for the E2E tests.

* Removed some unnecessary white space and also making code climate happy.

* Updated E2E test.

* Added a bit more to the E2E tests.

* Now validation for comment doesn't need to loop through textareas.

* Merge remote-tracking branch 'origin/master' into nickytonline/fix-comment-template-insertion-bug

* Removed a similar spec file and added tests to the other file.

* wip

* Fixed bug where a response template could not be submitted.

* Added/updated E2E tests.

* Reverted a small change to condition for showing the combobox popover.

* Undoing some white space changes as not related to PR.

* Trigger Build

* Put back article seed data as it's used in tests outside of comment tests.
2021-03-30 13:02:54 +02:00
Suzanne Aitchison
45a291047d
Re-add mention autocomplete to comments, fixing bugs (#13126)
* Revert "Revert "Add (updated) mention autocomplete to post comments (#13061)" (#13116)"

This reverts commit e28bde043c.

* Fix issues with editing comments and arrow key navigation, update tests

* Update app/javascript/crayons/MentionAutocompleteTextArea/MentionAutocompleteTextArea.jsx

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

* refactor adding of attributes

* destructure

Co-authored-by: Nick Taylor <nick@forem.com>
2021-03-26 13:43:05 +00:00
Andrew Bone
5a7173725c
Fix search confusion (#13130)
Search can currently be triggered by / or ? because they share the same code, to fix this I'm using the event's key instead
2021-03-26 11:08:56 +01:00
Andy Zhao
ca265a13be
Fix more button not working after navigating back to the home page (#12612)
* Reinitialize variables in instantclick context

* Refactor and follow instantclick loading pattern elsewhere

* Actually fix conflicts oops

* Add navigation links to e2e seeds

* Add e2e tests for More button with instantclick

* Set element's onclick directly as opposed to use addEventListener

* Remove unnecessary null check

* Check for visibility instead of class list

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Chain .should since we can 👍

* Update test and seed data to account for merge

* Use .findAllByLabelText instead of .get

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

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
2021-03-25 12:48:41 -04:00
Nick Taylor
e28bde043c
Revert "Add (updated) mention autocomplete to post comments (#13061)" (#13116)
This reverts commit a23caead07.
2021-03-25 10:33:51 -04:00
Veggier
5249b99338
Connect room name overflow (#9561)
* change tag to h2 to avoid the overflow

* delect commit

* make the font size bigger when screen size is more than 1000px

* Update chat.scss

Co-authored-by: Michael Kohl <citizen428@dev.to>
Co-authored-by: Michael Kohl <me@citizen428.net>
2021-03-25 13:16:58 +07:00
rhymes
83852038e4
[Search 2.0] Reading list (#13052)
* Step one in populating the reading list with PG

This first attempt tries to recycle the `Search::ArticleSerializer` which is only
used in input in ES, but we're using it in output in PG.
For this reason it's currently 15.55x times slower

* Serialize only what is requested by the frontend

`Search::ArticleSerializer` which is only used in ES in the indexing step aims
to add as much info as possible for broader purposes, in this case
(with serialization in output) we should aim to save only what's requested from
the frontend.

* Optimize selection of articles columns

* Select only needed columns for users

* Compute total of reading list items

* Attach the basic filtering based on PG on the search controller

* Restructure in methods

* Add tags support

* Use LIKE on articles.cached_tag_list

* Fix tags as nil

* Fix default pagination

* Add optional FTS for reading list

* Reworded the tags comment explaining why

* Add index to reactions.status

* Fix total counter in Preact readingList component

* Fix total count in reading list backend search

* Add GIN index to articles.cached_tag_list

* Add service tests

* Add search request specs

* Added missing early return

* Update spec/requests/search_spec.rb

Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>

* Extract MAX_PER_PAGE constant and add comments

Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
2021-03-24 15:40:00 +01:00
Andrew Bone
58499cefb3
Update shortcut code with best practices (#13026)
* Update with best practices

* Remove useCallback

* Update app/javascript/shared/components/useKeyboardShortcuts.js

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Fill out JSDoc

* Follow Prettier rules

* Resolve conflict

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2021-03-24 14:03:45 +00:00
Michael Kohl
7c31a9cc98
Remove buffer gem and related code: step 1 (#12993)
* Remove buffer gem and related code

* Remove more Buffer-related code

* Remove one more Buffer spec

* Remove DUS

* Remove more Buffer code
2021-03-24 09:58:38 +07:00
Nick Taylor
0beacb19c9
[15 Minute Fix] Added the prefer-const eslint rule (#13098) 2021-03-23 16:29:56 -04:00
Ridhwana
c53cfc5951
RFC#50-P4: Feature Flagged Routes and Interaction Design (#12967)
* feat: add the nested sidebar with some elements

* feat: create a tabbed nav item menu

* feat: add the tabbed nav_item partial to the views that need tabbed nav items

* fix: change variable back

* feat: style the sidebar a bit more

* chore: add some more styles

* feat: add a spec for the nested navigational items

* refactor: a more dynamic tabbed admin helper

* feat: add some more nav items

* fix: controller for reports

* refactor: shorthand if statement

* chore: add the whitespace back

* refactor: rubocop fixes

* chore: use any

* chore: remove whitespace

* refactor: rename the variable

* refactor: use a DSL style admin helper

* chore: variable renaming and routes

* rubocop: fixes

* refactor: move files to more apt places

* chore: keep overview as it was previously

* Update app/views/admin/secrets/index.html.erb

Co-authored-by: Michael Kohl <me@citizen428.net>

* Update app/views/admin/shared/_tabbed_navbar.erb

Co-authored-by: Michael Kohl <me@citizen428.net>

* Update app/views/admin/badges/index.html.erb

Co-authored-by: Michael Kohl <me@citizen428.net>

* chore: disable blocklength

* refactor: move the logic to the model instead of in the view

* chore: remove get_ prefix

* chore: move the request mangling to a helper that finds the controller and scope

* Update app/helpers/admin_helper.rb

Co-authored-by: rhymes <rhymes@hey.com>

* Update app/helpers/admin_helper.rb

Co-authored-by: rhymes <rhymes@hey.com>

* refactor: Address feedback

* oops

* oops use tr

* feat: update specs

* feat: make the navbar a dropdown

* feat: add a cursor pointer to the dropdown

* feat: add the icons which results in changed data structure

* fix: badge achievements

* feat: rename to an html file, show and collapse links + show active links

* chore: rename tabbed view to an html file

* fix: scope should be apps not app

* feat: add icons for the admin menu

* feat: increase the margin left

* feat: move the overview into the feature flag block and add an icon

* chore:remove files

* chore: indent

* feat: update crayons -link to have no text-decoration

* feat: current link for a scope with one controller

* Update app/lib/menu.rb

Co-authored-by: Michael Kohl <me@citizen428.net>

* Update app/models/admin_menu.rb

Co-authored-by: Michael Kohl <me@citizen428.net>

* refactor: we added svg to the builder so remove it from creating the hash

* feat: undo change to crayons and add it to the admin stylesheet

* Update app/views/admin/shared/_nested_sidebar.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* refactor: change to use ul and li's + a button

* chore: add bracket to next line

* feat: add aria-page

* chore: remove brackets

* feat: added focus specifically for the sidebar

* Update app/views/admin/shared/_nested_sidebar.html.erb

Co-authored-by: Jamie Gaskins <jgaskins@hey.com>

* chore: remove additional title

* chore: indent

* feat: add a visibilee keyword to the payload and set it to true by default

* feat: move the feature flagged routes into the correct sections

* feat: check if an item is visible before rendering it

* feat: amend the tabbed_navbar to be more accessible and add in visibilty checks

* chore: update comment

* chore: amend the styles

* chore: change url to path

* chore: comment

* test: add more tests

* Update app/assets/stylesheets/admin.scss

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/views/admin/shared/_nested_sidebar.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/views/layouts/admin.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* chore: merge

* feat: use focus for browsers that dont support focus-visible (I'm looking at you Safari) and move it within the crayons-link so we dont see it on mouse click

* WIP: first pass of stimulus controller code

* feat: interaction design

* chore: remove unnecessary condiition

* chore: only add transparent background when not the current link

* Update app/models/admin_menu.rb

Co-authored-by: Michael Kohl <me@citizen428.net>

* feat; comment explaining

* feat: add an id on the button to be clicked

* feat: disable currentNavItem

* chore: remove event params

* chore: update cursor

* feat: (safe fail)
only show the tabbed navbar when the roures contain values form the data structure

* chore: pass events through + tests

* trigger an onload event and test the disabling of the menu item

* refactor: tabbed menu items

* feat: account for the visibility  of the feature flags

* chore: rubocop fixes

* chore: indentation

* feat: some refactors and updates for rubocop

* Update app/javascript/admin/controllers/sidebar_controller.js

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

* feat: set to true

Co-authored-by: Michael Kohl <me@citizen428.net>
Co-authored-by: rhymes <rhymes@hey.com>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Jamie Gaskins <jgaskins@hey.com>
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
2021-03-23 11:12:54 +02:00
Suzanne Aitchison
8f9e3a3a55
refactor reach UI style import (#13082) 2021-03-22 12:02:53 +00:00
Suzanne Aitchison
a23caead07
Add (updated) mention autocomplete to post comments (#13061)
* add mention autocomplete functionality to article and notification comments

* add cypress tests

* make sure entry transitions dont replay

* undo change to async useeffect covered in other pr

* move search into dynamic import

* exit search if enter pressed in middle of search term

* refactor button activation code

* add a space after a mention is selected

* tweak cypress test for reply to ensure it awaits combobox

* small refactor
2021-03-22 09:18:13 +00:00
Jacob Herrington
8ab31f624f
Add missing CSS class (#13053) 2021-03-19 08:55:25 -05:00
Suzanne Aitchison
124620e0e8
change async await back to then (#13050) 2021-03-19 12:15:19 +00:00
Suzanne Aitchison
e3c97d18d6
Update storybook mention autocomplete component to take over whole textarea (#13044)
* Revert "Revert "Update storybook autocomplete component (#12980)" (#13027)"

This reverts commit f393dd2bbc.

* create helper function to replace node, add comments

* minor refactors
2021-03-18 15:04:59 +00:00
Nick Taylor
f222497913
Disabled 'no default exports' rule for Storybook files and Stimulus controllers (#13032) 2021-03-17 21:29:39 -04:00
Nick Taylor
f393dd2bbc
Revert "Update storybook autocomplete component (#12980)" (#13027) 2021-03-17 15:59:38 -04:00
Michael Kohl
7c7a8dcd45
Remove experimental /call functionality from Connect ✂️✂️✂️ (#12979)
* Remove Twilio gem

* remove VideoChatsController + views and specs

* Remove /call related code

* Update spec

* More JS cleanup

* Restore wrongly deleted files

* Remove obsolete files

* More cleanup
2021-03-17 17:06:15 +01:00
Rafi
09c645f5a1
Adding aria labels in Suggested people to follow screen during onboarding (#12384)
Co-authored-by: Nick Taylor <nick@dev.to>
2021-03-17 11:59:50 -04:00
Suzanne Aitchison
76a7ed6dbe
Update storybook autocomplete component (#12980) 2021-03-17 11:49:16 -04:00
Nick Taylor
c884082aa0
Turned off deprecated rule in jsx-a11y eslint plugin. (#12986) 2021-03-16 12:36:16 +01:00