Skip to content

Conversation

@danxuliu
Copy link
Member

Known issues:

  • If the chat tab is opened again after a file is shared the button will still be "Share this file" instead of "Join conversation". It seems that the FileInfo is not properly updated in the server when a file is shared (or unshared). This needs to be further investigated, but it seems to be an issue in the server and not in Talk.
  • The chat tab is shown for folders with a "Conversations are not available for folders" message (not localized). The tab will not be shown once Hide chat tab for folders #2605 is merged, but as it requires a change in server which was not ready for beta 3 that temporary warning is shown for now (to be able to release a Talk version that can be used with beta 3 of server).
  • Chat input is not focused after the chat view is shown.
  • This only adds the chat tab; calls in the sidebar will be added back in a different pull request.

@danxuliu danxuliu added 3. to review feature: chat 💬 Chat and system messages feature: frontend 🖌️ "Web UI" client feature: talk-sidebar ⬅️ Sidebar integration of Talk into other apps like sharing and documents labels Dec 20, 2019
@danxuliu danxuliu added this to the 💚 Next Major (18) milestone Dec 20, 2019
@danxuliu danxuliu mentioned this pull request Dec 20, 2019
Copy link
Member

@marcoambrosini marcoambrosini left a comment

Choose a reason for hiding this comment

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

Works nicely, just a couple of minor things 👍


<script>
// Explicitly enable smart-tabs so it is also applied to the CSS rules.
/* eslint no-mixed-spaces-and-tabs: ["error", "smart-tabs"] */
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
/* eslint no-mixed-spaces-and-tabs: ["error", "smart-tabs"] */

No hiding please, the coding style is the same across all nextcloud vue apps

Copy link
Member Author

Choose a reason for hiding this comment

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

It is not hiding anything, just enabling smart tabs so the comments can use spaces after the tabs for proper alignment (it works by default in the JavaScript code, but I have no idea why it does not in the CSS code). That is, to be able to write

	/* The chat view shares its parent with the call button, so the default
	 * "height: 100%" needs to be unset. */

instead of

	/* The chat view shares its parent with the call button, so the default
	* "height: 100%" needs to be unset. */

But as I said I would expect that to work too for the CSS code by default, so I do not know what I am missing.

Copy link
Member

Choose a reason for hiding this comment

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

danxuliu and others added 6 commits December 20, 2019 15:27
This is just a temporary message; in the future the whole tab will be
hidden in that case, but it depends on a fix in server which was not
ready yet for beta 3.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
The Talk sidebar is supported for a file when it meets certain sharing
conditions. If the Talk sidebar is not supported then a message is shown
to the user in the tab to share the file first.

In some cases it is not possible to know if the Talk sidebar is
supported or not only from the FileInfo data and it is necessary to
query the server. In those cases a loading icon is shown until the
response from the server is received.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
When the Talk sidebar is supported for a file a message is shown to the
user to explicitly join the conversation, and once joined the chat view
is shown in the chat tab. If a different file is selected the previous
conversation is left (even if the conversation for the new file is not
joined).

The sidebar tabs are created again whenever the sidebar is opened, be it
when changing to a different file or even when opening the sidebar again
for the same file after closing it. As the file of the current
conversation needs to be known to leave the conversation or not when the
FileInfo changes (so it is left if it is opened in a different file, but
kept if opened in the same file) the file ID of the current conversation
needs to be stored outside of the view.

Finally, as the AdvancedInput in shown in the chat view but there is no
route in use "this.$route.name" needs to be guarded.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Before, when the chat view was shown in the sidebar the sidebar height
grew to accomodate the full list of messages (or the chat view just
filled a section of the sidebar, depending on the browser). Instead of
that the chat view should grow to fill the available space in the tab
content, and the scroll bar should be provided by the list of messages
itself.

In order to do that it is necessary to modify the style of the tabs
content container to set "overflow: hidden". In Nextcloud 17 it was
possible to provide an additional set of CSS classes to be set in the
tabs content container when a tab was active with
"getTabsContainerExtraClasses", but unfortunately that is not currently
possible in Nextcloud 18. Therefore this needs to be done by explicitly
setting the desired CSS rules on the tabs content container when the
chat tab is the active tab (and removing it when it is no longer the
active tab).

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Signed-off-by: Daniel Calviño Sánchez <[email protected]>
@nickvergessen nickvergessen force-pushed the add-chat-tab-to-sidebar-in-files-app branch from 1bb87e7 to eb7aa7b Compare December 20, 2019 14:27
@nickvergessen
Copy link
Member

Open tasks moved to #2619
And rebased to fixups

@nickvergessen nickvergessen merged commit e359215 into master Dec 20, 2019
@nickvergessen nickvergessen deleted the add-chat-tab-to-sidebar-in-files-app branch December 20, 2019 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review feature: chat 💬 Chat and system messages feature: frontend 🖌️ "Web UI" client feature: talk-sidebar ⬅️ Sidebar integration of Talk into other apps like sharing and documents

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants