Originally created by: supreme-gg-gg
Originally owned by: alehhu
Is your feature request related to a problem? Please describe.
Since we already have Rich as a dependency and are intermittently using it, the next release should replace a few existing Cli functions such as the configuration setting to completely migrate to Rich interface, it makes it much easier for the user to interact with (currently we're like the gcloud CLI where you type like 10 flags by hand lmao)
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Originally posted by: supreme-gg-gg
This is pretty much just an UI enhancement issue, should be good for first timers
Originally posted by: supreme-gg-gg
We should replace these pages with Rich:
Originally posted by: alehhu
Hi! I'd like to take on the task. Let me know if it's okay
Originally posted by: supreme-gg-gg
Assigned to you 😄
p.s. the notification page just became interactive [#123] but shouldn't affect this issue
Related
Tickets:
#123Originally posted by: alehhu
Hi, I was adding Rich support in the configs.py file and did a table to display the dictionary's keys and values. I was wondering if I should tackle the 'too many flags' problem said earlier in this issue section, by handling user inputs in some other more interactive way (e.g. after the table has been shown, let the user choose directly the entry they want to modify and then ask for input of the value), or I should just stick to displaying stuff more nicely. I saw that there is also the option of using Textual library, which is built on Rich and gives the possibility of doing buttons, selections (e.g. selecting the entry of the table to modify its value), but I'm wondering if it adds unnecessary complexity to the project, since we are probably gonna keep the whole application coherent, and from what I've seen so far the UI is quite minimalistic.
Originally posted by: alehhu
but I can also handle user's inputs without Textual library and just asking for inputs from the user until they quit the config "application"/command.
Originally posted by: supreme-gg-gg
The
instagram config --editcommand already lets the user to edit it directly in a text editor like nano or vim if they need to make many changes, so I just realised the many flags issue doesn't really exist. For this feature UI enhancement would be enough since Textualize seems to be intended for building entire terminal apps and most of our app uses curses directly.I do understand that it will make the UI more interactive and modern, but we're also working on that for the new typescript client 😄
Originally posted by: alehhu
sorry for the trouble, I need some clarification (it's my first ever open source contribution, thanks for the patience 😅😰). I noticed that the
instagram notifypage is already using curse library, and has a nice formatting. I didn't quite understand If it needs to be redone with Rich, or by Notification page it was meant another page?Originally posted by: supreme-gg-gg
You're right that it already has nice formatting, I think we can keep it for now. I was thinking of something like this below (some quick prototyping) since Rich supports better color and styling. However since we already have that in the typescript client, this is not necessary.
cc @endernoke do you think we should update this to use Rich instead of curses when building the dashboard? The code itself is more readable and maintainable compared to curses, but might look a little bit out of style compared to the regular curses outlook of the python client?
EDIT: I think we should keep the project as
cursesoriented as possible, since the author himself said that both might not work well in combination in certain cases: https://stackoverflow.com/questions/72117224/how-to-integrate-rich-with-python-curses. Therefore, for the notification page let's keep it as it is, especially that the page involves handling input and there might be problems integrating Rich. For config it's good to have a prettier display and Rich is indeed intended for prettifying terminal output 😄It's indeed true that Rich + Textual might be more maintainable than our current
cursessetup, but a huge part of the project is already in curses (and certain features of chat view depends on it), + the typescript client (Ink / React) has most of the benefits of Rich and Textual already.Originally posted by: supreme-gg-gg
Sorry @alehhu for the confusion, the issue is a bit old as the project roadmap changed. Lmk if you have any other questions happy to help, looking forward to seeing the new config page 👀
Originally posted by: alehhu
Hi! It looks like this from my terminal. I think that the colors really depend on the terminal settings, also the font. Feel free to give more suggestions 👍
Originally posted by: supreme-gg-gg
This looks great 😄 big improvement from the JSON dump before lol, feel free to open a PR and I'll review it or open a draft if you're still working on something
Ticket changed by: supreme-gg-gg