feat: allow remote selection in git menu#349
Conversation
e645a89 to
52d83c1
Compare
idursun
left a comment
There was a problem hiding this comment.
Hey thanks for this.
This looks good but there's one inconvenience. For example in my remotes I would expect origin to be the first one in the list because that was the previous behaviour and also it is the most common thing I do. However, I am getting this list instead and this would require me to hit tab every single time.
Would you be able to make a change so that origin is always the first one?
|
hey @idursun thanks for the feedback! good catch on this! |
test(interal/remote): add remote parser test
test(git): update test to expect `--remote` flag
52d83c1 to
d765f12
Compare
|
solution with showing this also aligns with what @lorenzleutgeb mentioned in #261:
|
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [idursun/jjui](https://github.com/idursun/jjui) | patch | `v0.9.5` -> `v0.9.6` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>idursun/jjui (idursun/jjui)</summary> ### [`v0.9.6`](https://github.com/idursun/jjui/releases/tag/v0.9.6) [Compare Source](idursun/jjui@v0.9.5...v0.9.6) Another community driven release, mostly focusing on every day improvements. #### What's Changed - fix(ace\_jump): close operation after applying jump by [@​baggiiiie](https://github.com/baggiiiie) in [#​351](idursun/jjui#351) - feat: auto-detect preview placement, on by default by [@​lbonn](https://github.com/lbonn) in [#​348](idursun/jjui#348) - feat: allow remote selection in git menu by [@​baggiiiie](https://github.com/baggiiiie) in [#​349](idursun/jjui#349) - fix(fuzzy\_files): quote path for editor command by [@​baggiiiie](https://github.com/baggiiiie) in [#​354](idursun/jjui#354) - fix for preview copied status file and filename with {} by [@​baggiiiie](https://github.com/baggiiiie) in [#​357](idursun/jjui#357) - Support interactive file-level restores by [@​remo5000](https://github.com/remo5000) in [#​365](idursun/jjui#365) - fuzzy\_files: remove quoting for files in revset by [@​baggiiiie](https://github.com/baggiiiie) in [#​370](idursun/jjui#370) - ui/git: add --tracked to git fetch by [@​baggiiiie](https://github.com/baggiiiie) in [#​368](idursun/jjui#368) - operation: add ForceApply to squash/rebase footer by [@​baggiiiie](https://github.com/baggiiiie) in [#​371](idursun/jjui#371) - abandon: add force apply to footer help menu by [@​baggiiiie](https://github.com/baggiiiie) in [#​373](idursun/jjui#373) - docs(README): add winget and scoop as installation method in Windows by [@​abgox](https://github.com/abgox) in [#​362](idursun/jjui#362) - fix(set\_parents): keep parent order by [@​idursun](https://github.com/idursun) in [#​375](idursun/jjui#375) - fix(light theme): Removed the default border style of `bright white` as it was overriding the `text` style which should be the terminal’s default foreground and background. #### New Contributors - [@​lbonn](https://github.com/lbonn) made their first contribution in [#​348](idursun/jjui#348) - [@​remo5000](https://github.com/remo5000) made their first contribution in [#​365](idursun/jjui#365) - [@​abgox](https://github.com/abgox) made their first contribution in [#​362](idursun/jjui#362) **Full Changelog**: <idursun/jjui@v0.9.5...v0.9.6> </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever MR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi4xOS4wIiwidXBkYXRlZEluVmVyIjoiNDIuMTkuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90Il19-->
summary
display remotes setup in the repo, allow
tabto cycle select remotes in git menusee issue #261
feature
remotes display under
Titlein git menu--remoteoption is added to git operation (except those with existing--remoteoption or--all-remotesoptionwhen no remote is configured for the repo
NO REMOTE FOUNDis displayed""empty string is attached to--remotegit push --remote "")pressing
tabandshift+tabcycles through the list of remotesremotesbeing cycled through, items in git menu gets auto updated with selected remotewith
jjui/config.toml, user can config a default remote.origin, configured ininternal/config/default/config.tomlimplementation
subtitlefield to menu, display of menu with/withoutsubtitleis handled byrenderTitlesubtitleGitRemoteListto runjj git remote listto fetch a list of remotesremote_parserto parse the list of remotesremoteNames,selectedRemoteIdx,stylefields to gitModel, to handle remotes and subtitle styleNewModelmethod, separated menu list generation logic and gitModelcreation logicremote_parser, updated tests ingit_test.goto expect a--remoteflagothers
RebaseandRevertgroups. a minor update athelp_item_groups.goto add back the padding.UI