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

FE add "Link stream" action #2089

Closed
4 of 5 tasks
elatif2020 opened this issue Sep 18, 2023 · 11 comments · Fixed by #2392 or #2422
Closed
4 of 5 tasks

FE add "Link stream" action #2089

elatif2020 opened this issue Sep 18, 2023 · 11 comments · Fixed by #2392 or #2422
Assignees
Labels
Priority - A V [dev] verified on dev enviroment

Comments

@elatif2020
Copy link
Collaborator

elatif2020 commented Sep 18, 2023

We would like to allow linking a stream such that it could also appear in another space (or common).
BE ticket https://github.com/daostack/common-backend/issues/2063

  • Add "Link to..." in the stream actions menu. See design. This should be available only for users with the permissions for LINK_FROM_HERE (in the origin space). Also it should only be available for discussions (including the Home discussion) which are not exclusive to a circle higher than the base circle (currently it is Members), and also not for proposals.
  • Add a popup with the option to select possible target spaces. Design. Space should be sorted in a tree, using the same component we already have. Apply button should be activated only for spaces in which the user has the permission for LINK_TO_HERE (in the target space). Also - don't allow linking back to the origin space or to a space it's already linked in it. The appropriate BE endpoint should be called.
  • Add "Linked" icon next to the title of items which are Linked (either if this is the origin or linked item). Design.
  • Add clickable tooltip with "Also appears in:" and list of clickable paths to other locations. Design.

Future:

  • Linked item should have "Remove" option in the menu instead of delete, which should remove it only from the current space (not available in the Inbox). (Might require additional BE changes).
@andreymikhadyuk
Copy link
Collaborator

We have cache for feed items. Right now it is impossible to get an item in the middle of the cached group of items. But now with adding linked stream it becomes possible. So now during cache setting to the actual items we need to add the fetching of the items in the middle of cached group. We can add a statement to fetch only linked items inside this cached group, so it will be cheaper.

@andreymikhadyuk
Copy link
Collaborator

andreymikhadyuk commented Dec 11, 2023

@elatif2020 We need to discuss point which are not exclusive to a circle higher than the base circle, I do not understand what you mean here.

@andreymikhadyuk andreymikhadyuk linked a pull request Dec 12, 2023 that will close this issue
3 tasks
@andreymikhadyuk
Copy link
Collaborator

@elatif2020 You want tooltip to open on click, not on hover?

@elatif2020
Copy link
Collaborator Author

@elatif2020 You want tooltip to open on click, not on hover?

@andreymikhadyuk
Maybe better on hover if it staying once the user is trying to click on it

pvm-code added a commit that referenced this issue Dec 21, 2023
@NoamQA
Copy link
Collaborator

NoamQA commented Dec 24, 2023

@elatif2020 @andreymikhadyuk
❌ i cant link a discussion to another common
only to another space
when i choose a common the "apply" button become enabled
but when i click it there is a loader that appears and then get me back to the original common in the pop up window

@NoamQA NoamQA reopened this Dec 24, 2023
@elatif2020
Copy link
Collaborator Author

elatif2020 commented Dec 24, 2023

@elatif2020 @andreymikhadyuk
❌ i cant link a discussion to another common
only to another space
when i choose a common the "apply" button become enabled
but when i click it there is a loader that appears and then get me back to the original common in the pop up window

@andreymikhadyuk @NoamQA
Probably it's related to the following condition we have in the BE:
Linking is enabled for either:

  • items with public visibility, or
  • If it is in context of the same root-common and autoJoin is enabled (for both spaces, or one of them is the root) allow it also for items visible to the base circle (Member)

Probably it's not enforced in the FE, and should added.

@andreymikhadyuk
Copy link
Collaborator

@elatif2020 The conditions on the BE are different. We do not cover some of them on the FE side.
Screenshot 2023-12-25 at 11 37 45
Screenshot 2023-12-25 at 11 38 12
Screenshot 2023-12-25 at 11 37 57

@andreymikhadyuk
Copy link
Collaborator

andreymikhadyuk commented Dec 25, 2023

  • if the item is visible to the base circle and source and target commons are in the same tree

@andreymikhadyuk andreymikhadyuk linked a pull request Dec 25, 2023 that will close this issue
4 tasks
pvm-code added a commit that referenced this issue Dec 26, 2023
@NoamQA
Copy link
Collaborator

NoamQA commented Dec 28, 2023

@elatif2020 @andreymikhadyuk
❌ now i cant link a discussion to another common or space
i cant choose one from the list...

@NoamQA NoamQA reopened this Dec 28, 2023
@elatif2020
Copy link
Collaborator Author

elatif2020 commented Dec 28, 2023

@elatif2020 @andreymikhadyuk ❌ now i cant link a discussion to another common or space i cant choose one from the list...

@NoamQA I can... did you tried with spaces where you have Admin permissions?
image

@NoamQA
Copy link
Collaborator

NoamQA commented Dec 28, 2023

@elatif2020
yes
i can only link to a space in the original common
but not to another common or space in it

@NoamQA NoamQA added the V [dev] verified on dev enviroment label Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority - A V [dev] verified on dev enviroment
Projects
None yet
4 participants