-
Notifications
You must be signed in to change notification settings - Fork 11k
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
feat: Hide UI elements through window postmessage #31184
Conversation
🦋 Changeset detectedLatest commit: 93ca176 The changes in this PR will be included in the next version bump. This PR includes changesets to release 30 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #31184 +/- ##
===========================================
+ Coverage 49.47% 49.55% +0.08%
===========================================
Files 3312 3314 +2
Lines 81379 81447 +68
Branches 16659 16663 +4
===========================================
+ Hits 40260 40364 +104
+ Misses 36416 36372 -44
- Partials 4703 4711 +8
Flags with carried forward coverage won't be shown. Click here to find out more. |
…hideUi * 'develop' of github.com:RocketChat/Rocket.Chat: (21 commits) chore: Rename useFileInput to useSingleFileInput (#31186) regression: FED-116 allow to invite rc users to fed channels (#30658) refactor: Remove `livechat.js` file (#31179) test: Fix Analytics test to use always same date (#31178) chore: notify messages on emails incoming and outgoing (#30925) chore: add msg stream to the federation v1 feature (#31105) chore: update editedBy when the user changes their username (following BE rules) (#31098) chore: add a manual msg stream update for autotranslate (#31094) chore: send streaming msg update on livechat decline call event (#31025) chore: Replace `IconButton` in favor of `Button` on `PageHeader` (#31171) refactor: Migrate `analytics.js` to service (#31051) feat: Add `push.info` endpoint to retrieve push gateway info (#30868) chore: Convert Importer classes to typescript (#29714) docs: fix lost image render in markdown (#31013) feat(uikit): Move `@rocket.chat/ui-kit` package to the main monorepo (#31138) i18n: Language update from LingoHub 🤖 on 2023-12-05Z (#31161) feat: Skip to main content shortcut and `useDocumentTitle` (#30680) chore: Replace `useForm` in favor of RHF on Omnichannel `AgentsEdit` (#30789) chore: ImageGallery tweaks (#31159) fix: New `custom-roles` license module isn't properly checked (#31153) ...
…hideUi * 'develop' of github.com:RocketChat/Rocket.Chat: (112 commits) chore: update yarn.lock chore: Replace `FramedIcon` in favor of fuselage component (#31356) chore: fix dep version Release 6.5.2 fix: wrong value used for workspace registration ci: update release PR description with change log fix: inquiries being limited to 50 items (#31267) fix: close image gallery on backdrop click (#31344) fix: No error message when uploading a file that is not allowed (#31346) fix: Text area only shows the last line of the message for very long texts #31252 #31257 (#31262) chore: adding new streamer event for imported messages (#31063) chore: adapt read receipts feature to work without oplog on msgs (#30996) chore: remove Messages model dependency of Rooms model (#31272) chore: `Card` normalization (#31335) refactor: unify useStream and useSingleStream (#31326) chore: add new msg stream for reported msgs (#31087) Bump 6.5.2 feat: Highlight words in thread messages (#31281) fix: Show only departments that are allowed on registration page on livechat widget (#31302) fix: Fallback forward department not working as expected on chat forwarding (#31296) ...
.../client/views/room/composer/messageBox/MessageBoxActionsToolbar/MessageBoxActionsToolbar.tsx
Outdated
Show resolved
Hide resolved
.../client/views/room/composer/messageBox/MessageBoxActionsToolbar/MessageBoxActionsToolbar.tsx
Outdated
Show resolved
Hide resolved
...meteor/client/views/room/composer/messageBox/MessageBoxActionsToolbar/hooks/ToolbarAction.ts
Outdated
Show resolved
Hide resolved
.../views/room/composer/messageBox/MessageBoxActionsToolbar/hooks/useCreateDiscussionAction.tsx
Show resolved
Hide resolved
…hideUi * 'develop' of github.com:RocketChat/Rocket.Chat: chore: add gitpod config file for quick setup (#30921) feat: Allow user to set timeout of outgoing webhook (#31222) feat: added modal confirmation before pinning message (#31348) fix: not being able to access or create rooms with join code (#31270) chore: services changes on lifecycle methods + throw if svc is not available (#31375) test: bump playwright (#31376) i18n: update translations (#29462) i18n: adds video call translations for Persian language (#30406) regression: `AppRow` bundleIn verification (#31373) feat: Add Desktop PDF viewer (#31279) fix: Attachments not collapsing when using incoming webhook (#31318) chore: add aria-label to Select Inputs at Engagement Dashboard (#31249) fix: engagement dashboard timezone selector (#31248)
Small question, Is there a reason this was introduced strictly for users who embed via iframe, and not just made to work with the existing role-based permission system? I have personally run into several issues over multiple years with things on my workspace that could be quickly solved if a variation of this feature was made available to those who use the standard web interface provided by the server application itself. |
@MHFDoge it's actually not exclusive to iframe, you can use it anywhere you can inject a custom script. This comes from common user requests that try to embed rocket.chat in another application, so it fits this need without being to complex. Coupling the UI to the role-based permission system is not something we want to do. |
Proposed changes (including videos or screenshots)
Made possible to hide some UI elements through the window.postMessage event.
Initial supported UI elements are:
Composer Toolbar
Room Toolbar
Message Toolbar
User actions toolbar
Issue(s)
CE-46
Steps to test or reproduce
Further comments
Example call to hide all UI elements