This change extends the existing UpdateUI to make it possible
to read string from users during the schema upgrade process.
One usage of this change is that we can allow administrators to
decide the target change status (work-in-progress or private)
during the migration of draft changes.
Change-Id: I8f7f09618e2bc76129e7fbb9613aa5b90a5e1558
This was accidentally shuffled in I8cec3c3c, but NoSuchChangeException
may be thrown by ChangeControl.GenericFactory#controlFor.
Change-Id: If1a8bac25e2641c358be5c94ae461c6cf26425f7
Modifying the reviewed state of an edit patchset is an illogical action,
and should be disabled.
This change adds an _editLoaded property to gr-diff-view to
conditionally hide the reviewed checkbox. In addition, attempts to
modify the reviewed state are treated as a no-op.
TODO: Further utilize this approach to conditionally show buttons for
modifying an edit patchset. Will be done in a later change.
Bug: Issue 4437
Change-Id: I0ea98e49c5ec66e73f45fef9db5e3849d6e594df
_generateUrl in gr-router expected project names to be passed in with
the 'project' property on the params object parameter. However, utility
functions in gr-navigation passed it with the prop name 'projectName' --
this meant that no generated URLs would ever have the project name
supplied.
This change fixes this inconsistency, and modifies the getUrlForChange
function to also supply the project name to generateUrl.
Change-Id: I05c1ef21db16278e0795aee3fb6dbf76601ad6f5
In order to get type safety check working, behaviors needed to be
refactored so that the behavior assignment contains the actual
behavior object, rather than a reference to the object. This is done
so that the behaviors can easily be passed to fried-twinkie as
additional source files.
Feature: Issue 6914
Change-Id: Ibc4c5b6e2f53498f822be2df5aa41514831e6f5f
The 'n key presses' suite of gr-file-list tests would trigger async
inline diff rendering by an effect. Because the async rendering is
niether explicitly started nor cancelled, it extends past the lifetime
of the test and render work goes on in the background of the following
test. The processing code called functions which were stubbed when
triggered but were un-stubbed at the end of the test (sometimes before
the async processing had completed). The processing attempts to invoke
such a function the failure is attributed to whichever test is running.
With this change, the async rendering is not triggered in the first
place by setting an additional stub.
Bug: Issue 6949
Change-Id: I06dd2e0c889937a353da30337215c813db32ef42
`history.replaceState` was sometimes called within the router before
page URL state was pushed. This broke the browser back history within
the app.
`page.redirect` instead waits for the current route to push state and
then replaces it with the new one, leaving the browser history clean.
Bug: Issue 6996
Change-Id: I2e64475b4489b8e7685cd03cc8157ce8ce1de630
Until recently, trying to retrieve the subgroups of a not existing
group simply resulted in an empty collection being returned. That
behavior was exploited in IncludingGroupMembership.
Change-Id: Ie9319a8b705431a53ae4123453cc687444b1bd22
Supporting this in FieldDef required a lot of unnecessary boilerplate
that was (prior to earlier cleanups in this series) only used by the
change index, no other indexes. This also breaks a dependency edge
between the index package and the rest of gerrit-server, making it more
feasible to factor out a new build rule in the future.
Change-Id: I0785c7e2c93df7951818c3ebaa23e1e988686064
This is a little ugly, but allows us to completely get rid of FillArgs
in a followup commit, which is a net win. Another way to think of this
change is exposing "FillArgs" from ChangeData, which already is
injecting a ton of other stuff.
Change-Id: I572d5f4d98af4fe8024b6a5a0ca73577242c9ffb
Most current callers of #commitFooters() immediately extract the
tracking footers. Moving TrackingFooters into ChangeData allows us to
avoid injecting this into various other calling classes.
Change-Id: Ib3fc5be98bbe3164ec49c5ed1aedb2e631c9fdab
Even after removing one of the factory methods, there were still 4
assisted injected constructors, which all need to take 17 identical
arguments. Adding more has been painful for a while.
Separate an AssistedFactory class that only has a single method, so we
can keep ChangeData to a single constructor. Convert Factory to a
hand-written Factory that delegates to AssistedFactory as appropriate.
This refactoring made it clear that project can never be null. We can
thus remove OrmException from the project() method, which ripples
outwards.
Change-Id: Id053561ee1e1d8a79b2ce9be501bd69834932ba7
Gerrit's CanonicalWebUrl class is already responsible of getting
the full URL from either gerrit.config or the incoming HTTP request.
However, over time, other parts of Gerrit injected directly the
configured string through @CanonicalWebUrl annotation and did not
manage correctly the situation where the configuration is absent.
The only situation where gerrit.canonicalWebUrl is mandatory is
OAuth authentication, because the OAuth provider needs to have
a fixed callback URL with a single hostname.
Change-Id: Idee1d36eb08c53a0d06604b9a737695322e124d1
This concept topic provides conceptual information on what a patch set
is in Gerrit. Its intended audience is Gerrit users who, during the
course of learning how to use Gerrit, want to understand more about
what a Patch Set is, and some of the information the Gerrit Review
screen provides for a patch set.
This topic may eventually need screenshots, but creating them will happen in a
later change.
Change-Id: Icca726b598ce69593ff976c169bb4231244322a5
This topic is intended to provide more conceptual/in-depth information
for users. By adding this topic, we have something we can link to in
future how-to and tutorial topics, so we don't have to re-explain
what the refs/for namespace is each time.
This content for this topic originated from several other existing
topics. Those topics are still in place in the documentation. This
duplication is expected, until such a time as the Concepts section
is more complete.
Change-Id: I91cf6da1bdc1f8f53031ab2c0ac2a4c08fb4c0ff
This is a new concept topic for the Gerrit documentation. Note that,
while this topic contains a collection of content from a variety of
other topics in the doc set, such as the Review UI topic, the User
Guide topic, and the Project Owner Guide. Those topics will remain,
as they are still useful to users.
This topic is in many ways a reference that future "how-to" topics can
point to. The intended audience is Gerrit users who want more in-depth
information about what a change is, and what information about a change
they can view from the Gerrit UI.
Note: We may add screenshots to this topic in the future.
Change-Id: Iea3ba2aa7cdc77b561cb95f0ea83b1a3193bc281
Requesting only the current commit in the change detail serves no
commit if the current revision is not visible. Request commits for all
revisions so that the UI can show the latest visible revision. This
comes with the cost of additional server load in the change detail API.
Bug: Issue 6921
Change-Id: I38bcfb882b66d8ca3c57743746ba21c36570bfb9
Specifying the project as part of the change ID when the /changes
endpoint is used can help reduce latency significantly.
This change modifies _changeBaseUrl to return a URL that specifies both
the project and the change number. As a portion of this, there may be an
API call made to get the project number (this is unlikely, but
possible). Due to that fact, _changeBaseUrl now returns a promise.
Bug: Issue 6708
Change-Id: I630e521cf6226e579e99aa3dc08cc17239d4dbd4
Modifying the reviewed state of an edit patchset is an illogical action,
and should be disabled.
This change utilizes the _editLoaded property of gr-change-view to
conditionally hide the reviewed checkbox from the file list. In
addition, attempts to modify the reviewed state (e.g. with a hotkey)
are treated as a no-op, and the user is shown a toast.
TODO: Further utilize this approach to conditionally show buttons for
modifying an edit patchset. Will be done in a later change.
Bug: Issue 4437
Change-Id: Iee33d7ebbe0a7182cb91ca6168813154775d9ab4
Computed flag for use in enabling edit-specific actions, like
publishing, discarding, and modifying edits.
First use for this feature is computing whether edit specific buttons
like "Publish" and "Discard" ought to be shown/hidden.
Bug: Issue 4437
Change-Id: I5f9e92d49255f56b49113d4f33d5a61a743db4ea