Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: use useQuery in place of deprecated useEndpointData #27673

Merged
merged 22 commits into from
Jan 30, 2023

Conversation

Dnouv
Copy link
Member

@Dnouv Dnouv commented Dec 30, 2022

Use useQuery instead of the deprecated useEndpointData for the Users Table under the Admin console.

Thank you!

Proposed changes (including videos or screenshots)

Chore done:
useEndpointData -> useEndpoint for:

  • /apps/meteor/client/views/admin/
    • apps
    • customEmoji
    • customSounds
    • customUserStatus
    • integrations
    • invites
    • oauthApps
    • permissions
    • rooms
    • users

Issue(s)

Steps to test or reproduce

Further comments

@ggazzo ggazzo changed the title [IMPROVE] use useQuery in place of deprecated useEndpointData Chore: use useQuery in place of deprecated useEndpointData Dec 30, 2022
@debdutdeb
Copy link
Member

Ftr, this pr is overlapping with #27646 this a little bit for now.

@Dnouv
Copy link
Member Author

Dnouv commented Jan 1, 2023

Thank you for the heads up! I'll take care not to touch the components where the existing PR(27646) has already updated the hooks.

@Dnouv Dnouv force-pushed the remove_deprecated_user_dashboard branch from 1cb8116 to afc85a0 Compare January 10, 2023 18:15
@Dnouv Dnouv marked this pull request as ready for review January 10, 2023 18:30
@Dnouv Dnouv requested a review from a team as a code owner January 10, 2023 18:30
Copy link
Contributor

@tassoevan tassoevan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've made some suggestions regarding the query keys, based on some patterns that I coincidentally discussed with @dougfabris today: https://tkdodo.eu/blog/effective-react-query-keys

@Dnouv
Copy link
Member Author

Dnouv commented Jan 11, 2023

Thank you for the review, @tassoevan. The article shared was a good read. I have made the required changes.

tassoevan
tassoevan previously approved these changes Jan 11, 2023
@codecov
Copy link

codecov bot commented Jan 12, 2023

Codecov Report

Merging #27673 (93676e5) into develop (c8a8f21) will increase coverage by 1.14%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #27673      +/-   ##
===========================================
+ Coverage    42.03%   43.17%   +1.14%     
===========================================
  Files          842      815      -27     
  Lines        17604    17090     -514     
  Branches      2013     1938      -75     
===========================================
- Hits          7399     7379      -20     
+ Misses        9939     9442     -497     
- Partials       266      269       +3     
Flag Coverage Δ
e2e 43.17% <100.00%> (+1.14%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@Dnouv Dnouv force-pushed the remove_deprecated_user_dashboard branch from ab68402 to c58d09d Compare January 16, 2023 06:48
@Dnouv Dnouv requested a review from tassoevan January 18, 2023 05:00
@Dnouv Dnouv force-pushed the remove_deprecated_user_dashboard branch from c58d09d to 5f8873c Compare January 19, 2023 05:57
@debdutdeb debdutdeb added this to the 6.0.0 milestone Jan 30, 2023
@dionisio-bot dionisio-bot bot added stat: ready to merge PR tested and approved waiting for merge and removed stat: needs QA labels Jan 30, 2023
@kodiakhq kodiakhq bot merged commit 6c65889 into RocketChat:develop Jan 30, 2023
gabriellsh added a commit that referenced this pull request Feb 6, 2023
….Chat into matrixSearch

* 'feat/federation-feat-2' of github.com:RocketChat/Rocket.Chat: (31 commits)
  fix: removing file wrongly merged on update merge
  [NEW] Federation search public rooms in the Matrix network (#27434)
  Chore: Refactor other kinds of message - Phase 2 (#27927)
  Chore: improve some e2e selectors (#27936)
  [NEW] Warning Popup reinforcing Zapier deprecation on Integrations Admin settings (#27744)
  Chore: Notify Marketplace on App Install (#27925)
  i18n: Language update from LingoHub 🤖 on 2023-01-23Z (#27814)
  [FIX][ENTERPRISE] DDP streamer sending data to destroyed streams (#27929)
  Chore: Migrate cached collections to TypeScript (#27909)
  i18n: Language update from LingoHub 🤖 on 2023-01-09Z (#27705)
  [FIX] Reduce re-subscription on `notify-room/user-activity` stream event (#27911)
  [FIX] Unread Message count not displayed for new messages in Omni-Rooms (#27539)
  Chore: Improve service's licence check (#27872)
  [IMPROVE] Livechat Persian translation (#27825)
  Chore(deps): Bump thehanimo/pr-title-checker from 1.3.4 to 1.3.6 (#27884)
  Chore: use useQuery in place of deprecated useEndpointData (#27673)
  Chore: Update Some Composer Icons (#27862)
  Regression: Undefined default message context (#27870)
  Chore: Remove OS version for device management (#27786)
  [BREAK] Remove less theming (#27647)
  ...
@sampaiodiego sampaiodiego mentioned this pull request Feb 17, 2023
@sampaiodiego sampaiodiego mentioned this pull request Mar 9, 2023
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat: QA skipped stat: ready to merge PR tested and approved waiting for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants