Skip to content

Add interactive sort cycling with 's' key and display current sort in footer#331

Closed
benwyrosdick wants to merge 2 commits intoachannarasappa:masterfrom
benwyrosdick:master
Closed

Add interactive sort cycling with 's' key and display current sort in footer#331
benwyrosdick wants to merge 2 commits intoachannarasappa:masterfrom
benwyrosdick:master

Conversation

@benwyrosdick
Copy link
Copy Markdown
Contributor

  • Add sort cycling feature with 's' key and display current sort in footer

Copilot AI and others added 2 commits October 17, 2025 17:03
… footer (#1)

* Add sort cycling feature with 's' key and display current sort in footer

* Fix code review issues: proper error handling and dynamic width calculation
* Initial plan

* Add comma delimiters to dollar amounts in UI display

Co-authored-by: benwyrosdick <1733+benwyrosdick@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: benwyrosdick <1733+benwyrosdick@users.noreply.github.com>
Copy link
Copy Markdown
Owner

@achannarasappa achannarasappa left a comment

Choose a reason for hiding this comment

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

Overall the sort change looks good.

If you wanted to include the comma related changed, I'd have these high level comments:

  1. Not necessary to change the name to ConvertFloatToStringWithCommas
  2. I am thinking it might be valuable to have commas as an option rather than default since there are different conventions in different regions of the world. Open to thoughts on this since a initial solution may be okay without it until there is feedback asking for it.
  3. Adding commas changes the widths in each column so there should be some testing done on larger size numbers to ensure they don't exceed the max cell width for their respective cells.

{Text: styleLogo(" ticker "), Width: 8},
{Text: styleGroup(" " + groupSelectedName + " "), Width: len(groupSelectedName) + 2, VisibleMinWidth: 95},
{Text: styleHelp(" q: exit ↑: scroll up ↓: scroll down ⭾: change group"), Width: 52},
{Text: styleHelp(helpText), Width: len(helpText)},
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

The overall line width should be less than 80 and handle progressive display otherwise. I'd suggest using VisibleMinWidth to hide parts of this section based on screen width

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

one way is to add just the new sort help text with a VisibleMinWidth which equal to the width of the longest text describing a sort option

@achannarasappa
Copy link
Copy Markdown
Owner

I've addressed the previous feedback and merged this change with #340

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants