1. `Columns` widget use FIXED pack method for items
if they declare sizing as fixed.
2. `Columns` are implicitly declared as FIXED
if all contents sizes are known or can be calculated without external size information.
3. `Text` is explicitly FIXED and FLOW widget
(widget knows its size from contents).
Fix: explicit declare that widgets are FLOW-only
Change-Id: Ic0de5957ed47fadf2f0f02b235178eb03ecd1b04
1. Mentioned PR was merged > 8 years ago.
2. Issue with widget focusing on keypress is invalid:
arrow keys should point on widgets as it positioned
(if button at the next row - "right" button is ignored).
Change-Id: I6fecae34576196b63074a4b0db438aab3da3fd65
Starting in Gerrit 3.3, comments can include a special file-id of
/PATCHSET_LEVEL and these comments have no code context, thus no
line numbers or related files. A previous change
I6505d08b62ba7ad8877561a82732889e142873c3 attempted to skip these
when enumerating comments in diff view, but mistakenly only did so
on the new side of the diff. Apply the same skip to the old side as
well.
Change-Id: I22575015bd9e513d00024f026d2248c7a19c3d9e
In order to avoid having urwid warp the cursor to a non-selectable
widget when moving to a new ChangeView, set focus to the first item
we know will be selectable at the top of the screen, the Change-Id.
Change-Id: Ibd502eb18496eec37383370bb15a4f4cd8b3e5d7
All of our selectable widgets should have a cursor; if we use
SelectableIcon instead of a plain Text widget as the basis for
the TextButton, we will have one.
Change-Id: I490c7317a2d43727700066918b0b486d1a9cdc6b
The default for _selectable in the Pile class was switched to False
with https://github.com/urwid/urwid/pull/367 commit 018509d, so
explicitly declare change entries are selectable in order to allow
them to be navigated by keyboard with urwid 2.1.0 and later.
Change-Id: I31f3d62475ec2e8a10e7a553426412ad6aa43f8f
The gertty-specific hypertext widget did not handle cursor positioning,
so selectable text did not behave like buttons. This is an inconsistent
UI and causes problems for screen readers.
Change-Id: Iede3f663775fc169a757751acc1fe752dc00f544
This is needed for alembic >=1.7, though unfortunately goes entirely
unmentioned in its ChangeLog. Without adding the import, startup
raises this:
AttributeError: module 'alembic' has no attribute 'migration'
Change-Id: Icf4c4a9240a8d1ea993d3aed62664531f8013a3e
Rather than display the /PATCHSET_LEVEL and /COMMIT_MSG fake
filenames, translate those to nice strings like the web ui does.
Change-Id: I225c8e2ea9763f9dadbefc4a23329efe0f97d899
Starting in Gerrit 3.3, comments can include a special file-id of
/PATCHSET_LEVEL and these comments have no code context, thus no
line numbers or related files. Skip these when enumerating comments
in diff view because there is no relevant context for them.
Thanks to Paul Fertser for reporting and debugging this problem.
Change-Id: I6505d08b62ba7ad8877561a82732889e142873c3
Also for setting hashtags in change lists using the process mark.
Editing hashtags on individual change screens was already supported.
Selecting hashtags on a change screen will now perform a search for
that tag.
Change-Id: Icc23e10bbf22fbe9b1d958758ec6ceb3286e795b
A new style of internal url appears in Gerrit 3.x:
/c/PROJECT/+/NUMBER
This handles that in internal links and updates the terminal
integration docs with the new URL format as well.
Change-Id: I30bc6194b1b467b2e6500c5f11e5d06de1aea721
With the upgrade of opendev's gerrit to 3.2.5.1, the git clones are
failing because the repository url no longer has p/ in it. This change
adds p/ in only if the version is less than 3 when we do a version check.
Change-Id: Id05cfa6449c6c36dd59c7efd74d57cebafcb78c6
This button was not working because we sync the change before sending
a review, which reset the pending state. Determine whether we are
intending to submit the change before performing that sync, and
remember it after the sync is done.
Change-Id: I8c85c2a8fec50b50fb92037f6dcbcc7917c3baff
The change view did not display comments from previous patchsets,
only comments associated with the patchset of the current message.
This displays them from all patchsets, annotating them with the
patchset number when it is different.
Note, the line comments were correctly displayed in the diff view.
Change-Id: Ieda0de0bb24800b9c3f577f339ca1338f2f1cc38
Even though we won't usually display it, binary data may show up
in a diff. We can't decode it to display it, so just replace it
with a placeholder string so we don't crash.
Change-Id: I4794e707745ed8315afec00c1981e239ec98ef0e
Default config location was changed recently. This commit
updates information about where this config should be placed in
message printed if there is no config file found at all.
Change-Id: I847005182d2a31a25b51886bd4997ce8a74075c0
This is necessary on systems where the username may not be present
(e.g., gerrit-review.googlesource.com).
Change-Id: Ia91b1e9b0fb0f98728dca46a488a92a97a301274
The behavior for searching "file" more closely matches the documented
behavior for "path". Implement "path" the same as "file", then update
"file" so that the non-regex form matches path components.
Change-Id: I03bf6d5232472069ea288b1ce0fe955469791af1
When searching for file: we previously would return changes with
any revisions with matching files. Gerrit itself only considers
the latest revision, so match its behavior.
Also, correct a py3 issue with the message attribute not existing
on the SearchSyntaxError exception class.
Change-Id: I645e58b010cc3a2f74883e97f8be3634efbc2a20
Add '<' and '>' keybindings which are used for diffing pairs of
patchsets. '<' moves to the previous pair, '>' to the next.
Change-Id: I46d24f6e62f113e16be2445a8e52384086c01c8e
This change changes the default location for the gertty configuration
file that takes precedence if none is supplied on the command line to
~/.config/gertty/gertty.yaml. If that file does not exist, the previous
location of ~/.gertty.yaml is consulted as a fallback.
Change-Id: I5ee6224219b0229c7b1ba17205c3f4cf8fb1d62b
Story: 2002119
Task: 19798
File comments were causing an exception when displayed on the
change view because python3 does not allow comparing None to int,
and file comments have a line number of None.
To correct this, use 0 as the line number for file comments whin
sorting and displaying them in the change view; there is no line
0 so this minor aliasing shouldn't cause any collisions.
Also, add a newline to the end of file comments, just as regular
inline comments (otherwise if a file comment was followed by a
line comment, they would appear on the same line).
Change-Id: Iedf88cdfd83adbc405e26cb013c9f57481d50c90
There are some lines which were being read as byte arrays and
were not decoded into strings which was causing them to bypass
tab expansion (because they caused an exception which was caught
and the un-expanded text was used instead). Correct those cases
and disable the exception handler so that we can identify any
other cases by triggering a crash.
Change-Id: I4b34132290fc8611cc770d572068197b33c0789c
tabs are displayed as question mark by urwid, so need replacing.
While we are replacing, might as well mark them like in the web UI.
Ideally I would want to use a slightly different color for them,
but that would require to add many new colors in the config (context,
full new line, part of new line) and would not be very compatible
with 8-colors terminals -- the '»' character is hopefully rarely used
enough to be useable as is.
Change-Id: Ic974774bf546765fa5b3e9266aee8ff973865502
- Add a config option to enable closing a change after a review
is saved, and going back to the change list.
- Enable reviewKeys from the change page to also work on the
diff view.
Change-Id: I37d907132a012d074d38345f15ef83ec7d9f3e6c
Many of the other keybindings seem to have emacs defaults, so add
page-up/page-down, for use on laptop keyboards without real page
keys.
Change-Id: I02bd8bebe9bfea89133d2eb28322bcf5fabaacf8