-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
[NEW] Heavy weight threading (now called Discussions)- with minor model impact #11803
Closed
Closed
Changes from 1 commit
Commits
Show all changes
108 commits
Select commit
Hold shift + click to select a range
d4a052a
[WIP] Add thread creation to home screen
mrsimpson 97f8c6f
Made it look nice, fix a lot of essentials, added even more TODOs
mrsimpson 510efee
enable debugging for non-rocketchat-packages
mrsimpson 5963fdb
Propagate user creating the thread properly
mrsimpson 2bd5eff
Ask questions with thread
vickyokrm 9994302
world cloud integration fix
vickyokrm e1f27ca
fix circleci out of memory
vickyokrm 85a3279
fix circleci
vickyokrm 5949142
update npm
vickyokrm 8770ce3
Add translations
mrsimpson 34248e7
Role-Check needs roomas context
mrsimpson fbfa4e5
Adapt thread-created message to display the quoted message
mrsimpson 4a0c5e9
Fix channel attachments not being navigateable as mentions
mrsimpson 1324c37
Add threading from context menu
mrsimpson 66e3f8e
Add icon for threading
mrsimpson adf1254
Support renamed rooms in thread message
mrsimpson ee22f80
Support usage of channel-ID in mentions
mrsimpson eac4147
Move threading setting to separate group to allow stable automated tests
mrsimpson ed10759
Adapt circle-ci configuration for Assistify
mrsimpson 8e1fbbf
Verticall align thread creation on home screen
mrsimpson 41ee70b
Fix book-icon for wordcloud
mrsimpson ab5b300
Provide back button from wordcloud
mrsimpson 731f33e
show all channels in thread settings
vickyokrm a335908
Merge branch '#418-requestless-threading' of https://github.com/assis…
vickyokrm a53bfba
Don't show wordcloud for the time being
mrsimpson a602124
Merge branch '#418-requestless-threading' of https://github.com/assis…
mrsimpson bb64b24
update circleci config to our tagnames
mrsimpson 11c4005
Fix autocomplete for parent channel
vickyokrm c5f194b
Merge branch '#418-requestless-threading' of https://github.com/assis…
mrsimpson 5da86c1
Add threads to sidepanel
mrsimpson dc6bcdc
Explicit route for create-thread
mrsimpson 8e2e8f6
Fix configuration andselect proper default channel
mrsimpson 65bb748
minor UI fixes
mrsimpson 06a1b19
Add parentRoom index to rooms and subscriptions
mrsimpson 89c781e
create threads in direct messages as private groups
mrsimpson 137e10a
Create thread from direct message with better name
mrsimpson ad7f2cd
Improve UX
mrsimpson 4f818ba
Fix scrolling and make sidebar-button larger
mrsimpson 5e5edeb
Unimplement threading on home fix overlapping modals
mrsimpson a495f84
Minor beautifications on code level
mrsimpson 18c86fe
Fix: Allow normal users to select only public channels for threads
mrsimpson ce34629
Move threading button to the top
mrsimpson 792fcf0
Hide private channels from inital dropdown
mrsimpson 5761d67
Improve creation screenUX
mrsimpson 7438c44
Don't offer threads as potential parents
mrsimpson 0da19c3
Configure action menu for threading
mrsimpson 6aa72ce
remove no-rooms-message from threading list
mrsimpson 17aa919
Merge remote-tracking branch 'upstream/develop' into core/threading
mrsimpson c6f81d1
Remove "no threads" text from sidebar
mrsimpson f82c0ed
Remove "no threads" text from sidebar
mrsimpson d07d256
Fix test failing due to new user preference
mrsimpson 25e5a9a
Add scripts for executing tests seperately
mrsimpson 4c07c51
Exclude test-documentation screenshots from git
mrsimpson e9c082c
Add tests for threading
mrsimpson 5a8d5e9
Add thread creation from message action
mrsimpson 812f9c0
Cleaup tests for threading
mrsimpson 0a8858d
Merge remote-tracking branch 'origin/#418-requestless-threading' into…
mrsimpson 7b2a85e
Add migrations for requests and topics
mrsimpson 05b4d08
Skip setup-wizard tests if they completed earlier on
vickyokrm 6f12af8
Revert try of skipping the setup wizard
mrsimpson 62c5daf
Grant more time for autocomplete to vanish
mrsimpson 35203c9
Provide the threaded message as message quote preserving ordering
mrsimpson 0510e38
Fix wordcloud being visible in dropdiwn
mrsimpson 8d5f038
Fix migration: update subscriptions too
mrsimpson 9928698
choose general as default channel
mrsimpson 9d46d13
update ui texts
mrsimpson 6055aca
Set focus on thread creation
mrsimpson d96df06
Move threads list in sidenav beneath the favorites and unred
mrsimpson 39ec65f
Merge pull request #434 from assistify/#418-requestless-threading
mrsimpson 39551ae
Merge remote-tracking branch 'upstream/develop' into core/threading
mrsimpson 74a2666
Cleanup unnecessarily changed artefacts
mrsimpson afdfcd8
Satisfy the even stricter linter
mrsimpson 1dc8917
Satisfy stylelint
mrsimpson c2c1b87
Adapt threading test for CircleCi's low performance
mrsimpson b53a82e
Merge branch 'develop' into core/threading
MarcosSpessatto 5678971
Import global variables that has been removed from eslintrc
MarcosSpessatto 5344861
Fixes as already implemented and tested on downstream fork
mrsimpson ea956fc
Validate permission for thread creation for showing the button
mrsimpson e732f95
Merge branch 'develop' into core/threading
engelgabriel f608568
Merge branch 'core/threading' of https://github.com/assistify/Rocket.…
mrsimpson d1486ef
Resolve merge conflicts and add auth for button
mrsimpson 36f491b
Navigatable back button in thread header
mrsimpson af7efbf
Merge branch 'develop' into core/threading
mrsimpson a59e49b
Import Toastr
mrsimpson efcad4b
Infrastructure for custom renderings of attachment fields
mrsimpson a26fa39
Replace global openRoom with Router-function
mrsimpson 795fda4
Minimal identification checks in methods
mrsimpson 548f77a
Add replies and last-message-age to thread created
mrsimpson e7586b7
add package.js
mrsimpson b106f93
Merge branch 'develop' into pr/11803-mrsimpson-core/threading
sampaiodiego 637accc
Fix file names
sampaiodiego b490778
Don't suppress system messages in threads
mrsimpson cfcc113
Slash command /thread
mrsimpson 64d179e
Merge branch 'core/threading' of https://github.com/assistify/Rocket.…
mrsimpson fef61d6
Make thread metadata on message update on new thread message
mrsimpson 0a6272a
Add slash command and fix linting
mrsimpson a00e826
Add threads tabbar
mrsimpson 701ad20
Threads: Display last change on instead of age
mrsimpson e9f1fae
Fix filenames
mrsimpson f0f0242
Merge remote-tracking branch 'upstream/develop' into core/threading
mrsimpson 5390eb8
Merge remote-tracking branch 'upstream/develop' into core/threading
mrsimpson 89a1db8
Add missing imports
mrsimpson 2ed0843
Merge branch 'develop' into core/threading
engelgabriel 2d0ed55
Merge branch 'develop' into core/threading
mrsimpson 37334ba
Merge branch 'core/threading' of git@github.com:assistify/Rocket.Chat…
ggazzo bd6c565
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into pr/1…
ggazzo f9e1fe7
fix imports
ggazzo 510c039
fix imports
ggazzo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Meteor } from 'meteor/meteor'; | ||
import { addRoomAccessValidator, canAccessRoom } from 'meteor/rocketchat:authorization'; | ||
import { Rooms } from 'meteor/rocketchat:models'; | ||
|
||
Meteor.startup(() => { | ||
addRoomAccessValidator(function(room, user) { | ||
return room.prid && canAccessRoom(Rooms.findOne(room.prid), user); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,76 +1,58 @@ | ||
import { Meteor } from 'meteor/meteor'; | ||
import { RocketChat } from 'meteor/rocketchat:lib'; | ||
|
||
function getParentChannels() { | ||
const result = Meteor.call('getParentChannelList', { sort: 'name', default: -1 }); | ||
|
||
return result.channels | ||
.filter((channel) => !!channel.name) | ||
.map((channel) => ({ | ||
key: channel.name, // has to be "key" in order to be able to select it in the settings as dropdown | ||
i18nLabel: channel.name, | ||
})); | ||
} | ||
import { settings } from 'meteor/rocketchat:settings'; | ||
|
||
Meteor.startup(() => { | ||
RocketChat.settings.addGroup('Threading'); | ||
|
||
// the channel for which threads are created if none is explicitly chosen | ||
let defaultChannel = ''; | ||
|
||
const generalChannel = RocketChat.models.Rooms.findOneById('GENERAL'); | ||
|
||
if (generalChannel) { | ||
defaultChannel = generalChannel.name; | ||
} else { | ||
const potentialParentChannels = getParentChannels(); | ||
defaultChannel = potentialParentChannels[0] ? potentialParentChannels[0].key : ''; | ||
} | ||
RocketChat.settings.add('Thread_default_parent_Channel', defaultChannel, { | ||
group: 'Threading', | ||
i18nLabel: 'Thread_default_parent_Channel', | ||
type: 'string', | ||
public: true, | ||
}); | ||
|
||
// Set the default channel on each restart if unset | ||
if (!RocketChat.settings.get('Thread_default_parent_Channel')) { | ||
RocketChat.models.Settings.updateValueById('Thread_default_parent_Channel', defaultChannel); | ||
} | ||
|
||
RocketChat.settings.add('Thread_invitations_threshold', 10, { | ||
group: 'Threading', | ||
i18nLabel: 'Thread_invitations_threshold', | ||
i18nDescription: 'Thread_invitations_threshold_description', | ||
type: 'int', | ||
public: true, | ||
}); | ||
|
||
RocketChat.settings.add('Thread_from_context_menu', 'button', { | ||
group: 'Threading', | ||
i18nLabel: 'Thread_from_context_menu', | ||
type: 'select', | ||
values: [ | ||
{ key: 'button', i18nLabel: 'Threading_context_menu_button' }, | ||
{ key: 'none', i18nLabel: 'Threading_context_menu_none' }, | ||
], | ||
public: true, | ||
}); | ||
|
||
RocketChat.settings.add('Accounts_Default_User_Preferences_sidebarShowThreads', true, { | ||
group: 'Accounts', | ||
section: 'Accounts_Default_User_Preferences', | ||
type: 'boolean', | ||
public: true, | ||
i18nLabel: 'Threads_in_sidebar', | ||
}); | ||
|
||
// this is a technical counter which allows for generation of unique room names | ||
RocketChat.settings.add('Thread_Count', 1, { | ||
group: 'Threading', | ||
i18nLabel: 'Thread_count', | ||
type: 'int', | ||
public: false, | ||
hidden: true, | ||
settings.addGroup('Threading', function() { | ||
// the channel for which threads are created if none is explicitly chosen | ||
this.add('Thread_invitations_threshold', 10, { | ||
group: 'Threading', | ||
i18nLabel: 'Thread_invitations_threshold', | ||
i18nDescription: 'Thread_invitations_threshold_description', | ||
type: 'int', | ||
public: true, | ||
}); | ||
|
||
this.add('Thread_from_context_menu', 'button', { | ||
group: 'Threading', | ||
i18nLabel: 'Thread_from_context_menu', | ||
type: 'select', | ||
values: [ | ||
{ key: 'button', i18nLabel: 'Threading_context_menu_button' }, | ||
{ key: 'none', i18nLabel: 'Threading_context_menu_none' }, | ||
], | ||
public: true, | ||
}); | ||
|
||
this.add('Accounts_Default_User_Preferences_sidebarShowThreads', true, { | ||
group: 'Accounts', | ||
section: 'Accounts_Default_User_Preferences', | ||
type: 'boolean', | ||
public: true, | ||
i18nLabel: 'Threads_in_sidebar', | ||
}); | ||
|
||
// this is a technical counter which allows for generation of unique room names | ||
this.add('Thread_Count', 1, { | ||
group: 'Threading', | ||
i18nLabel: 'Thread_count', | ||
type: 'int', | ||
public: false, | ||
hidden: true, | ||
}); | ||
|
||
|
||
const globalQuery = { | ||
_id: 'RetentionPolicy_Enabled', | ||
value: true, | ||
}; | ||
|
||
this.add('RetentionPolicy_ExcludeThreads', false, { | ||
group:'RetentionPolicy', | ||
type: 'boolean', | ||
public: true, | ||
i18nLabel: 'RetentionPolicy_ExcludeThreads', | ||
i18nDescription: 'RetentionPolicy_ExcludeThreads_Description', | ||
enableQuery: globalQuery, | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 5 additions & 4 deletions
9
packages/assistify-threading/server/hooks/propagateThreadMetadata.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
import { RocketChat } from 'meteor/rocketchat:lib'; | ||
|
||
import { callbacks } from 'meteor/rocketchat:callbacks'; | ||
import { Messages } from 'meteor/rocketchat:models'; | ||
/** | ||
* We need to propagate the writing of new message in a thread to the linking | ||
* system message | ||
*/ | ||
RocketChat.callbacks.add('afterSaveMessage', function(message, room) { | ||
callbacks.add('afterSaveMessage', function(message, room) { | ||
if (room.linkMessageId) { | ||
RocketChat.models.Messages.refreshThreadMetadata(room.linkMessageId); | ||
Messages.refreshThreadMetadata(room.linkMessageId); | ||
} | ||
return message; | ||
}, RocketChat.callbacks.priority.LOW, 'PropagateThreadMetadata'); | ||
}, callbacks.priority.LOW, 'PropagateThreadMetadata'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
packages/assistify-threading/server/methods/getParentChannelList.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import { RocketChat } from 'meteor/rocketchat:lib'; | ||
import { Rooms } from 'meteor/rocketchat:models'; | ||
|
||
import s from 'underscore.string'; | ||
|
||
Object.assign(RocketChat.models.Rooms, { | ||
Object.assign(Rooms, { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ggazzo can we move these functions to inside |
||
findThreadParentByNameStarting(name, options) { | ||
const nameRegex = new RegExp(`^${ s.trim(s.escapeRegExp(name)) }`, 'i'); | ||
|
||
|
3 changes: 2 additions & 1 deletion
3
packages/assistify-threading/server/publications/threadParentAutocomplete.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ggazzo can we move these functions to inside
models
package?