Two-way databinding was causing some cyclical UI updating, resulting in
an incorrect redirect URL. Instead of binding to the patchNum and
basePatchNum in both directions, the patch-range-select fires an event
when it notices a change in the selected patchsets.
Bug: Issue 7336, Issue 7315, Issue 7316
Change-Id: Ifdf476dcf4fa1353d0b280d7e6dd25e4ef40865a
This also moves the change reloading logic back to the change view,
where it gets updated patch ranges via a two-way data binding.
Change-Id: Ib09ad1a176ba96bac77a513d344226df029aef7b
Slight refactoring required in order to satisfy both use cases:
- Fire an event when patch range changes and let parent element
handle it.
- Support comment strings
- availablePatches becomes an array of objects instead of an
array of integers.
Change-Id: Ia8da9296f41eb2d45c9358d03fbec3940273ad9d
ORIGINALLY: Iafd4b80af53624027c347f0f443b4cdfde292e29
This change makes the change view and the diff view change edit aware.
Mutation operations on edit itself, like editing files in editor, are
beyond the scope of this change.
Change edits must be fetched with a separate change edit endpoint and
merged into the change.revisions object. The _number of an editInfo is
'edit'. It has a special property called 'basePatchNum' that marks
which patch set the edit is based on. In patch set selectors, the edit
is sorted right after its basePatchNum.
Alternative implementation considerations:
It could be easier to handle edits on the Polygerrit UI, if
GET /changes/<id>/detail endpoint
would optionally include the change edit in the resulting
change.revsions map.
TODOs:
* Overwrite change.current_revision with change edit commit in some
use cases
* Mark the change edit as Change Edit in the header of the change view
* Allow for modification of the edit in the change/diff view
* Disable commenting on files in edit patchsets
* Modify file list rows to have appropriate actions when edit is
selected (e.g. allow revert, disable marking as reviewed)
* Identify and whitelist valid change/revision actions for an edit
Bug: Issue 4437
Change-Id: Ia4690d20954de730cd625ac76920e849beb12f7c
Some browsers crash when allowed to have extremely long options in a
dropdown. This change truncates the user-supplied field of patch set
descriptions to 500 chars to prevent these crashes.
Bug: Issue 5085
Change-Id: I1fa5df3badb4ceca90519dfcd89369376992c432
Adds an editable label allowing the change owner to edit patchset
descriptions within the UI.
Also re-styles the dropdowns pertaining to patchsets for better UX.
Feature: Issue 4544
Change-Id: I15c0f8ab6a60c3a06482fe152539615d31eeae0f
This change adds the patch set description, if it exists, in every patch
set select in the change view and the diff view. Also includes
refactoring of an existing function into a behavior for use in other
files, and removes some unnecessary DOM nodes from the change-view.
http://imgur.com/a/rEhOF
Feature: Issue 4544
Change-Id: Id5f8d2d5750f3f7afc677e16c411327f53487b19
Previously, on a changelist or file view, if you change the patchset
to a lower number and then click the back button, dropdown value did not
change properly. The issue was related to how the selected option was
rendered in a dom-if. This change refactors the gr-select element to fit this
use case.
Bug: Issue 4800
Change-Id: I66ee5b7aba5421a01ca79f9e72a853a73c32e589
There is no change in functionality. Only moving things around.
+ Separate html from the js.
+ Place the unit test for a component within the same folder.
+ Organize the components in subfolders.
Change-Id: I51fdc510db75fc1b33f040ca63decbbdfd4d5513