Previously, the logic assumed that the API request would fetch all
projects, not just the current page. In order to properly display the
next button, modify the API request to ask for one result than wanted,
but only display the original number desired. If the full amount + 1 is
returned, there should be a next button.
Change-Id: I67c6fb9cd6009220a1d9ac24fe4506bd6383428e
When going to /admin/projects/test for example it will take you back
to the old ui to view the project configs.
Bug: Issue 5966
Change-Id: I7d6fb8f17a235602bba0c535cfe4b43030f515a3
When loading image diffs as API support for parent-indexed change files
rolls out, request the fast version first and fall back to the existing,
slower version if that fails.
Bug: Issue 5751
Change-Id: I1d3916e2fdfda66a7925825c6b3fbfbf178b4c36
Now we have a specific predicate for finding ignored changes, we can use
that instead of the 'star:ignore' query.
Change-Id: I0c47fea273514a9117f20606d7202a6d1a153aa2
This is necessary to allow email addresses with '+' in them
to be properly understood by the backend.
Bug: issue 6066
Change-Id: Ifc79310d0a20a72b9c208a031e4a5bdd6da7a7e1
This updates most of polygerrit links to use the implementation added in
I2b2d704fe33c90ea2f2a2183fc79897642a48175 .
Change-Id: Ib3bb694969e903fd76a1dad13cfb642bde086142
This updates most of polygerrit links to use the implementation added in
I2b2d704fe33c90ea2f2a2183fc79897642a48175 .
Change-Id: Ib3bb694969e903fd76a1dad13cfb642bde086142
Previously there were times when binary data from an image diff would
display. This change adds a check in the diff processor for image diffs
and does not display anything other than the file line in that case.
This change also addresses an issue where the label is calculated too
soon. The image size (if it exists) is supposed to be included as part
of the label, but often this was calculated before the image was done
rendering, so it didn't display.
Bug: Issue 5887
Change-Id: I9cd1ad0c3f2603492d7d84892147bd6852bbae29
https://bugs.webkit.org/show_bug.cgi?id=169970
There seems to be a bug in iOS 10.3 that if the header is undefined
everything fails. That's fixed in safari 10.2 which is not in safari 10.1
on iOS 10.3.
We can revert this when the fix makes it into iOS 10.3.
Bug: Issue 5715
Change-Id: I7c027b5bf90c67d15541188120b202aa965cf1d5
(cherry picked from commit 37140336228faaa6ff13892954bbbd425fed8a08)
https://bugs.webkit.org/show_bug.cgi?id=169970
There seems to be a bug in iOS 10.3 that if the header is undefined
everything fails. That's fixed in safari 10.2 which is not in safari 10.1
on iOS 10.3.
We can revert this when the fix makes it into iOS 10.3.
Bug: Issue 5715
Change-Id: I7c027b5bf90c67d15541188120b202aa965cf1d5
When credentials are refreshed, but the new credentials are for a
different account than before, the entire page is reloaded. In this way,
the available UI actions will correspond to the new user's capabilities.
Bug: Issue 5820
Change-Id: I48ff608b2e68d284b6bbcf4f843f64d3390136a8
When returning to a page after a long time, test the credentials
immediately after the page has been foregrounded and show the auth-toast
if they are found to be expired.
Currently, while the user is expected to be refreshing their
credentials, the GR-ERROR-MANAGER listened to `visibilityChange` events
to hasten authentication checks. With this change, the error manager
always listens to `visibilityChange` events (rather than only when
refreshing). In response to these events it will:
- Check the credential refresh status (if the user is expected to be
refreshing credentials).
- Validate the user's credentials (if the credentials have not been
validated recently).
- Otherwise do nothing.
Change-Id: Ic9c0a739043cf7b35b89219739fd9bc5dba51634
Previously, the rest api interface set '__isOnParent' for comments.
When comments were added, the property from the comment thread
'isOnParent' was passed as a property. When the draft was saved, it was
expecting '__isOnParent' rather than 'isOnParent' and this caused
comments to show up on the wrong side after saved/refreshed, because
'__isOnParent' was undefined.
Instead of changing to either '__isOnParent' which would be strange to
pass as an attribute or 'isOnParent' which would look like it came from
the api directly, this change introduces isOnParent functions so that
translation doesn't need to be done with the API.
Bug: Issue 5831
Change-Id: I3b849ba5878275cda0a39638626a12bd51341a29
Use '__isOnParent' as a boolean in place if 'side' ('PARENT vs
'REVISION'). In doing so, it's necessary to convert to/from 'side'
whenever interacting with the REST API.
Change-Id: Ic023c9be1969597e4b9c73a51cfed9f5eb9bc23e
The three rebase options are
1. Rebase on parent change
2. Rebase on top of the <branch name> branch
3. Rebase on a specific change or ref
Scenarios:
Has parent, can rebase on parent
- Show all 3 options. Second two options show "breaks relation chain"
message.
Has parent, can't rebase on parent
- Instead of option 1, show message that is up to date with parent.
- Show second two options with "breaks relation chain" message.
Has no parent, can rebase on parent (tip of branch)
- Do not show option 1, nor dipslay message in its place.
- Show second two options without "breaks relation chain" message.
Has no parent, can't rebase on parent (tip of branch)
- Do not show option 1, nor dipslay message in its place.
- Instead of option, show message that change is up to date with tip of
branch already
- Show option 3 without "breaks relation chain" message.
Because 'hasParent' isn't immediately known when change actions are
displayed, the rebase button will also remain disabled until this
becomes known.
Bug: Issue 5447
Change-Id: I45ef8241a75c1f5d197ed64e51b19c5ce74d0227
Previously, people using Polygerrit did not realize how to access admin
functionality in GWT. This build out a skeleton menu, and displays the
appropriate menu items based on role. The page itself will still show
the default admin view placeholder.
Bug: Issue 5470
Change-Id: I1266dd8fb70d0afac485f1e547fae85acee7e5aa
Get a hasParent attribute from the related changes endpoint, determining
if a change has a parent change that is not the tip of the branch.
This will be used by the rebase dialog to display tailored options
that make rebasing more intuitive. UI changes to follow.
This change also updates rebaseOnCurrent from being a property of
gr-change-view to getting added in the rest api interface as a property
of the rebase action. This is why the property is removed from all
views until the reply dialog, where it is passed as a parameter.
Bug: Issue 5447
Change-Id: If31e4c42d8e82f00fba9fa98c28371046299eec4
Some Gerrit instances will require cookies in order to serve binary
content requests, but the use of `fetch` for `_fetchB64File` in
GR-REST-API-INTERFACE did not have the credential option set, and would
fail on such instances. With this change the credentials option is set.
Bug: Issue 5371
Change-Id: I5f8e8fd74bb3775bda00217fabac38031d010e05
In some cases, the reply dialog could be opened before all comment
drafts have been saved, causing the draft to not appear in the dialog.
This change maintains an array corresponding to each draft request and
refers to it before opening the reply dialog. If the array is populated,
a non-blocking alert is shown with the text 'Try again when all comments
have saved.'
Bug: Issue 5369
Change-Id: Ieb73e7d7b4f66daff6cc2278a84c2195b7d0e541
- Adds range when parent exists when comment POSTed
- Finds range via filtering comments for backfill
Bug: Issue 5459
Change-Id: Ied19cc4b33749ba81fad6d1a5030abab419b1e6f
Introduces GrReviewerUpdatesParser that processes individual reviewer
updates and groups them. This essentially moves implementation from
/c/94490/ to client side to gather requirements ahead of server-side
implementation. Ultimately, this class will simply be removed once
server-side generates grouped updates.
Sequential updates are grouped if:
- They were performed within short timeframe (6 seconds)
- Made by the same person
- Non-change updates are discarded within a group
- Groups with no-change updates are discarded (eg CC -> CC)
Bug: Issue 4383, Issue 5256
Change-Id: Ieb405d4b5562294adb23bdd14879e9e67737890f
Adds max-count prop to gr-account-list and utilizes it to create the
Assignee field in gr-change-metadata with autocompletion.
Feature: Issue 5229
Change-Id: Ifc796703322ff6d68040d10e0294e7aa8f6ce0ea
Handles #/VE/token links from confirmation emails sent by Gerrit by
redirecting to /settings/VE/token and validating the token using REST API.
Errors and success messages are shown as a pop-up toast using gr-alert
via show-alert DOM event handled by gr-error-manager.
Feature: Issue 4196
Change-Id: Ia6d40894512cd77b4d19f88668af15c68f03b10d