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

[TUI] General TUI Notes #224

Closed
3 of 4 tasks
JoeZiminski opened this issue Oct 20, 2023 · 12 comments · Fixed by #231
Closed
3 of 4 tasks

[TUI] General TUI Notes #224

JoeZiminski opened this issue Oct 20, 2023 · 12 comments · Fixed by #231
Labels
enhancement New feature or request tui Terminal User Interface

Comments

@JoeZiminski
Copy link
Member

JoeZiminski commented Oct 20, 2023

This issue describes small notes and things to implement that are generated from PRs but that it makes more sense to tackle later.

Directory Tree

  • double click also opens and close the folder, consider using right-click or a hold-button + click.
  • delete directories through the directory tree
  • update the directory tree either periodically or whenever it is clicked in order to display changes that have been made in the underlying filesystem (e.g. if deleting a file through the system file browser) (see Refreshing the DirectoryTree without resetting the selected node. Textualize/textual#3574)
  • maybe only show the root folder name at the top and provide an easy way to get the full path (e.g. right-click menu)
@JoeZiminski JoeZiminski added the enhancement New feature or request label Oct 20, 2023
@b-peri b-peri added the tui Terminal User Interface label Oct 24, 2023
@b-peri
Copy link
Collaborator

b-peri commented Oct 24, 2023

Project Selection Screen

  • Implement lightweight script for extraction of project metadata (date created, date last edited, datatypes, n_subjects, etc.)

TabScreen

Create Tab

  • “Templating” + dynamic inference of “Next” subject/session value (Done)
  • Validation of sub and ses strings (with corresponding tcss properties → Change in border color when valid/invalid) (Done)
  • Implement ToolTips that appear when hovering over Input or DirectoryTree widgets. (Done)
  • Preserve tree open status after reload!

Log Tab

  • Displays simple text file containing all actions performed on selected projects + datetime

@JoeZiminski
Copy link
Member Author

Windows powershell or cmd does not work we,, Anaconda Powershell prompt, which looks pretty much exactly the same as the WIndows Terminal (both look good). If the anaconda temrinal looks good cross platform we can just reccomend running in this.

@JoeZiminski
Copy link
Member Author

macOS is rendering weird, this is know textual problem that does not look like a quick fix. This makes it difficult to recommend it's use on Mac.

Down the line it would be nice to package datashuttle, so use does not need to worry about installing conda at all. Under this model I believe we should be able to spin up an anaconda prompt ourselves, i.e. forcing the user to use a terminal we know will render properly. Until then though we will have to ask users to install a different terminal for best experience on macOS. If this is the case and there are no workarounds we should move to a package install as soon as possible.

@JoeZiminski
Copy link
Member Author

JoeZiminski commented Oct 27, 2023

Some misc. general TODOs

  • add persistant settings for create tab ( checkboxes), has a button or something that brings up modal window for create-tab preferences (e.g. autofill options)
  • Add type hints, some preliminary tests just to understand how textualize is testing
  • update datashuttle to have an option to return the existing projects in last-modified order so they can be displayed in this order on TUI
  • Find out if we can have hyperlinsk in textualize and add them to NewProjectPage and the future get help page if so.

@JoeZiminski
Copy link
Member Author

JoeZiminski commented Oct 27, 2023

  • We need somewhere to 'setup-ssh-connection-to-central-server'.

@JoeZiminski JoeZiminski linked a pull request Nov 12, 2023 that will close this issue
@JoeZiminski JoeZiminski changed the title General TUI Notes [TUI] General TUI Notes Nov 13, 2023
@JoeZiminski
Copy link
Member Author

JoeZiminski commented Nov 16, 2023

  • add tooltips to all relevant widgets
  • refresh the directory tree on filesytem change - textual currently implementing updated filetree that keeps the currently selected node when the directorytree is updated (currently it refreshes to root)
  • Figure out best how to present to the user that validation is local vs. central (SSH is very slow)
  • add tests

@JoeZiminski
Copy link
Member Author

JoeZiminski commented Nov 22, 2023

  • Give the option to use a filetree to select the local (and central if local filesystem) folder path. Typing in path a last resort.
  • Move the ‘central path’ option under the ssh option. If local filesystem, use filetree. If SSH, fix the ssh server path to the start of the input box.
  • Remove confirmation on the configs screen as it simply duplicates the existing information.
  • Rename ‘Configure Project’ to ‘Save’.
  • Rename ‘central_host_username’ to ‘central_host’.
  • Change central host autofill.
  • Regex builder with buttons to input \d and .? and .* to the template.
  • Let people delete stuff with a warning (?) or only delete empty folders.
  • Add option to allow making folders even if validation fails.
  • Make datatype name lowercase.
  • Add a little question mark icon somewhere on ‘create folders’ that can specify things like @ tags, the right / left click mode.

@JoeZiminski
Copy link
Member Author

JoeZiminski commented Jan 12, 2024

Notes on the create tab:

  • Make regexp for template validation more user friendly and test the user-input regexp
  • Textualize has button attribue that is the index of the button clicked. On my machine (windows 10) 1 is left click and 3 is right click. I doubt these are consistent across machines, this needs testing and / or discuss with textual devs. (fixed by using CTRL modifier key as heard from textual devs right-click is not robust cross-platform).
  • Figure out how to manage validation against local .vs remote repo. By default only the local is validated against because polling the filesystem over SSH is very slow. However if central is connected with local filesystem it is not slow. In general, we want to validate across local and central whenever possible. We need to figure out a way to present this to the user so it is very clear with sensible defaults.

@JoeZiminski
Copy link
Member Author

JoeZiminski commented Jan 16, 2024

  • Add a hold key + double click on file to append new suggested file rather than replacing.

@JoeZiminski
Copy link
Member Author

Add 'Options' button on Transfer tab that contains transfer related options which are currently stored in CFG.

@JoeZiminski
Copy link
Member Author

see https://textual.textualize.io/getting_started/ for terminals that textual runs on. Best option is probably to package all terminals (if possible) (or use system if works) and just launch them + run command in them from python (again, if possible).

@JoeZiminski
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request tui Terminal User Interface
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants