Skip to content

feat: auto-detect preview placement, on by default#348

Merged
idursun merged 2 commits intoidursun:mainfrom
lbonn:auto-preview
Oct 24, 2025
Merged

feat: auto-detect preview placement, on by default#348
idursun merged 2 commits intoidursun:mainfrom
lbonn:auto-preview

Conversation

@lbonn
Copy link
Copy Markdown
Contributor

@lbonn lbonn commented Oct 22, 2025

It's usually beneficial to display preview at the bottom in a tall terminal.

With these changes, jjui will try to detect it automatically while still letting the user switch between horizontal and vertical splits.

tig behaves in a similar way.

oplog_command = ["op", "show", "$operation_id", "--color", "always"]
file_command = ["diff", "--color", "always", "-r", "$change_id", "$file"]
show_at_bottom = false
position = "auto"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

How can people know possible valid values for position? Remember that most people don't tend to read documentation, perhaps adding a comment of possible values is enough ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes that's a good point. I think I'll try to follow an approach similar to SuggestMode, recently introduced

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@vic updated

Though log.Fatal does not show in stdout stderr by default. One has to define DEBUG=1 and look in debug.log https://github.com/lbonn/jjui/blob/6e95d19846d33eb0fbd07d9563a2ad02cd9f9136/cmd/jjui/main.go#L118

Copy link
Copy Markdown
Owner

@idursun idursun left a comment

Choose a reason for hiding this comment

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

Thanks!

@idursun idursun merged commit d21fb6f into idursun:main Oct 24, 2025
3 checks passed
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Nov 24, 2025
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 [@&#8203;baggiiiie](https://github.com/baggiiiie) in [#&#8203;351](idursun/jjui#351)
- feat: auto-detect preview placement, on by default by [@&#8203;lbonn](https://github.com/lbonn) in [#&#8203;348](idursun/jjui#348)
- feat: allow remote selection in git menu by [@&#8203;baggiiiie](https://github.com/baggiiiie) in [#&#8203;349](idursun/jjui#349)
- fix(fuzzy\_files): quote path for editor command by [@&#8203;baggiiiie](https://github.com/baggiiiie) in [#&#8203;354](idursun/jjui#354)
- fix for preview copied status file and filename with {}  by [@&#8203;baggiiiie](https://github.com/baggiiiie) in [#&#8203;357](idursun/jjui#357)
- Support interactive file-level restores by [@&#8203;remo5000](https://github.com/remo5000) in [#&#8203;365](idursun/jjui#365)
- fuzzy\_files: remove quoting for files in revset by [@&#8203;baggiiiie](https://github.com/baggiiiie) in [#&#8203;370](idursun/jjui#370)
- ui/git: add --tracked to git fetch by [@&#8203;baggiiiie](https://github.com/baggiiiie) in [#&#8203;368](idursun/jjui#368)
- operation: add ForceApply to squash/rebase footer by [@&#8203;baggiiiie](https://github.com/baggiiiie) in [#&#8203;371](idursun/jjui#371)
- abandon: add force apply to footer help menu by [@&#8203;baggiiiie](https://github.com/baggiiiie) in [#&#8203;373](idursun/jjui#373)
- docs(README): add winget and scoop as installation method in Windows by [@&#8203;abgox](https://github.com/abgox) in [#&#8203;362](idursun/jjui#362)
- fix(set\_parents): keep parent order by [@&#8203;idursun](https://github.com/idursun) in [#&#8203;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

- [@&#8203;lbonn](https://github.com/lbonn) made their first contribution in [#&#8203;348](idursun/jjui#348)
- [@&#8203;remo5000](https://github.com/remo5000) made their first contribution in [#&#8203;365](idursun/jjui#365)
- [@&#8203;abgox](https://github.com/abgox) made their first contribution in [#&#8203;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-->
@lbonn lbonn deleted the auto-preview branch December 2, 2025 09:06
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