Skip to content

Several improvements for the Welcome/Repositories page #1387

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

Closed
wants to merge 7 commits into from

Conversation

goran-w
Copy link
Contributor

@goran-w goran-w commented Jun 4, 2025

  • Unify all file-path normalization, to use char-replace (instead of string-replace) and to trim any trailing slash.
    • Removing (if present) the trailing slash in paths is needed to avoid failing comparisons, since DirectoryInfo.Fullname (and .FullPath) will not "normalize" the presence/absence of a trailing slash, making any direct equality tests error-prone.
    • This fixes a bug in ScanRepositories.GetUnmanagedRepositories(), where not all Git repo folders were added.
  • Refactor the sorting of the RepositoryNode tree, to use a single method instead of duplicated code.
    • Also make the sorting of the RepositoryNode tree case-insensitive, to make items easier to locate.
    • Sort & Save the whole RepositoryNode tree after a complete rescan, to make sure it's fully consistent.
  • Activate TabsDropdownItem on Tapped instead of DoubleTapped, for easier access.
  • Bug-fix: Prevent exception in Repository.RefreshBranches(), for repo which has no commits/branches yet.
  • Correct spelling error in App.GetLauncher() method.
  • Correct a variable name from 'founded' to 'found'.

goran-w added 7 commits June 4, 2025 17:11
This is needed since DirectoryInfo.Fullname (and .FullPath) will not "normalize" trailing slashes, so direct equality tests are error-prone.
This fixes a bug in ScanRepositories.GetUnmanagedRepositories(), where not all Git repo folders were added.
(Also, corrected a variable name from 'founded' to 'found'.)
@love-linger
Copy link
Collaborator

I've manually cherry-picked partial of commits in your PR.

Commit 663567e is not picked. I think sort by name in case-sensitive way is more common than case-insensitive and I really do not like it. For example:

A
a
Ab
ac
ad
Ae

BTW. Next time, please don't submit so many commits (for different purpose) in a single PR. It's difficult to tell from GitHub which changes correspond to which commit. I can only cherry-pick each commit manually and then review. It's too tiring.

@goran-w
Copy link
Contributor Author

goran-w commented Jun 5, 2025

Thank you. I'll use fewer commits and more concise PR branches in the future. But also, you could've asked me and I would have removed the unwanted commit from my PR branch. 😉

However, personally, I find case-sensitive sorting very frustrating, since bee is not located between Beat and Bell in the example below - I have to look through two "sections" of the list to find it...

Art
Beat
Bell
Boo
Cow
Deep
Early
Far
arty
bee
cee
dee
fee

So at least it should be made a global Preference "Use case-insensitive sorting in all lists" (or similar)!

Let's close this PR, I'm working on a new one for optional case-insensitive sorting (including some bug-fixes). 😬

@love-linger love-linger closed this Jun 6, 2025
@goran-w
Copy link
Contributor Author

goran-w commented Jun 6, 2025

Follow-up PR for case-insensitive sorting Preference option: #1401

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.

2 participants