launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #21436
[Merge] lp:~matiasb/launchpad/updates-for-channels-widget into lp:launchpad
Matias Bordese has proposed merging lp:~matiasb/launchpad/updates-for-channels-widget into lp:launchpad.
Commit message:
Reworked how snap store channels widget is displayed.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~matiasb/launchpad/updates-for-channels-widget/+merge/321571
Screenshot: https://drive.google.com/a/canonical.com/file/d/0B86R3FlId_HRQjVDTS03VXB2VU0/view?usp=sharing
--
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~matiasb/launchpad/updates-for-channels-widget into lp:launchpad.
=== modified file 'lib/lp/snappy/browser/widgets/storechannels.py'
--- lib/lp/snappy/browser/widgets/storechannels.py 2017-03-30 14:08:55 +0000
+++ lib/lp/snappy/browser/widgets/storechannels.py 2017-04-02 01:43:38 +0000
@@ -41,7 +41,6 @@
class StoreChannelsWidget(BrowserWidget, InputWidget):
template = ViewPageTemplateFile("templates/storechannels.pt")
- display_label = False
_separator = channel_components_delimiter
_default_track = 'latest'
_widgets_set_up = False
@@ -49,6 +48,8 @@
def __init__(self, field, value_type, request):
# We don't use value_type.
super(StoreChannelsWidget, self).__init__(field, request)
+ # disable help_text for the global widget
+ self.hint = None
def setUpSubWidgets(self):
if self._widgets_set_up:
=== modified file 'lib/lp/snappy/browser/widgets/templates/storechannels.pt'
--- lib/lp/snappy/browser/widgets/templates/storechannels.pt 2017-03-30 14:08:55 +0000
+++ lib/lp/snappy/browser/widgets/templates/storechannels.pt 2017-04-02 01:43:38 +0000
@@ -1,22 +1,35 @@
<table>
<tr>
<td>
- <tal:widget define="widget nocall:view/track_widget">
- <metal:block
- use-macro="context/@@launchpad_widget_macros/launchpad_widget_row" />
- </tal:widget>
- <p class="formHelp">
- To open a new track, <a href="https://snapcraft.io/community">ask the store admins</a>.
+ <p class="formHelp">Channels to release this snap package to after uploading it to the store.
+ A channel is defined by a combination of an optional track and a risk, e.g. '2.1/stable', or 'stable'.
</p>
</td>
</tr>
<tr>
<td>
- <tal:widget define="widget nocall:view/risks_widget"
- condition="widget/context/value_type/vocabulary">
- <metal:block
- use-macro="context/@@launchpad_widget_macros/launchpad_widget_row" />
- </tal:widget>
+ <table class="subordinate">
+ <tr>
+ <td>
+ <tal:widget define="widget nocall:view/risks_widget"
+ condition="widget/context/value_type/vocabulary">
+ <metal:block
+ use-macro="context/@@launchpad_widget_macros/launchpad_widget_row" />
+ </tal:widget>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <tal:widget define="widget nocall:view/track_widget">
+ <metal:block
+ use-macro="context/@@launchpad_widget_macros/launchpad_widget_row" />
+ </tal:widget>
+ <p class="formHelp">
+ To open a new track, <a href="https://snapcraft.io/community">ask the store admins</a>.
+ </p>
+ </td>
+ </tr>
+ </table>
</td>
</tr>
</table>
Follow ups