Giter Club home page Giter Club logo

Comments (2)

jhthorsen avatar jhthorsen commented on June 21, 2024

We've been wanting to be able to "favorite" channels for a while, but in your case, it might be useful to actually "hide" channels instead. I'm thinking we could add a visibility attribute (other name is more than welcome) to a conversation object and use that in any way we want in the user interface.

  1. Add a visibility attribute to https://github.com/convos-chat/convos/blob/main/lib/Convos/Core/Conversation.pm. This could be a number, where -1 = hide, 0 = normal, and let's say 100 could be favorite. This attribute must also be added to TO_JSON, and the relevant tests must be updated.
  2. One hurdle is that there isn't any good way to change the Conversation object by the user, so we either need a new endpoint in https://github.com/convos-chat/convos/blob/main/public/convos-api.yaml and a new controller to update the given object, or we could just make a new command in https://github.com/convos-chat/convos/blob/main/lib/Convos/Core/Connection/Irc.pm#L37 to change the visibility, like /visibility #convos -1. If we go for the command, it would be nice to steal the command from other clients.
  3. After that, we need new logic in https://github.com/convos-chat/convos/blob/main/assets/components/ChatSidebar.svelte to sort by visibility and hide those with -1. The -1 conversations should however appear if searched for and maybe we should display them if notifications is above 0?

If anyone wants to work on this, then https://convos.chat/doc/develop should give you an idea on how to get started.

from convos.

mostlyvirtual avatar mostlyvirtual commented on June 21, 2024

This would be the new section in the menu - it can be hidden if there are no Favourites.

favourites-menu

And this could be one option to make a channel a favourite, but I would need to figure out how that stores the state. I saw that disabling Notify me on new messages on that section creates a new key in localStorage called convos:chat:wantNotifications, so the same could be done for favourite? Where is that localStorage key coming from? Is it from the API?

favourites-conversation-settings

from convos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.