Merge lp:~matiasb/launchpad/updates-for-channels-widget into lp:launchpad

Proposed by Matias Bordese
Status: Merged
Merged at revision: 18340
Proposed branch: lp:~matiasb/launchpad/updates-for-channels-widget
Merge into: lp:launchpad
Diff against target: 71 lines (+26/-12)
2 files modified
lib/lp/snappy/browser/widgets/storechannels.py (+2/-1)
lib/lp/snappy/browser/widgets/templates/storechannels.pt (+24/-11)
To merge this branch: bzr merge lp:~matiasb/launchpad/updates-for-channels-widget
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+321571@code.launchpad.net

Commit message

Reworked how snap store channels widget is displayed.

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/snappy/browser/widgets/storechannels.py'
2--- lib/lp/snappy/browser/widgets/storechannels.py 2017-03-30 14:08:55 +0000
3+++ lib/lp/snappy/browser/widgets/storechannels.py 2017-04-02 01:43:38 +0000
4@@ -41,7 +41,6 @@
5 class StoreChannelsWidget(BrowserWidget, InputWidget):
6
7 template = ViewPageTemplateFile("templates/storechannels.pt")
8- display_label = False
9 _separator = channel_components_delimiter
10 _default_track = 'latest'
11 _widgets_set_up = False
12@@ -49,6 +48,8 @@
13 def __init__(self, field, value_type, request):
14 # We don't use value_type.
15 super(StoreChannelsWidget, self).__init__(field, request)
16+ # disable help_text for the global widget
17+ self.hint = None
18
19 def setUpSubWidgets(self):
20 if self._widgets_set_up:
21
22=== modified file 'lib/lp/snappy/browser/widgets/templates/storechannels.pt'
23--- lib/lp/snappy/browser/widgets/templates/storechannels.pt 2017-03-30 14:08:55 +0000
24+++ lib/lp/snappy/browser/widgets/templates/storechannels.pt 2017-04-02 01:43:38 +0000
25@@ -1,22 +1,35 @@
26 <table>
27 <tr>
28 <td>
29- <tal:widget define="widget nocall:view/track_widget">
30- <metal:block
31- use-macro="context/@@launchpad_widget_macros/launchpad_widget_row" />
32- </tal:widget>
33- <p class="formHelp">
34- To open a new track, <a href="https://snapcraft.io/community">ask the store admins</a>.
35+ <p class="formHelp">Channels to release this snap package to after uploading it to the store.
36+ A channel is defined by a combination of an optional track and a risk, e.g. '2.1/stable', or 'stable'.
37 </p>
38 </td>
39 </tr>
40 <tr>
41 <td>
42- <tal:widget define="widget nocall:view/risks_widget"
43- condition="widget/context/value_type/vocabulary">
44- <metal:block
45- use-macro="context/@@launchpad_widget_macros/launchpad_widget_row" />
46- </tal:widget>
47+ <table class="subordinate">
48+ <tr>
49+ <td>
50+ <tal:widget define="widget nocall:view/risks_widget"
51+ condition="widget/context/value_type/vocabulary">
52+ <metal:block
53+ use-macro="context/@@launchpad_widget_macros/launchpad_widget_row" />
54+ </tal:widget>
55+ </td>
56+ </tr>
57+ <tr>
58+ <td>
59+ <tal:widget define="widget nocall:view/track_widget">
60+ <metal:block
61+ use-macro="context/@@launchpad_widget_macros/launchpad_widget_row" />
62+ </tal:widget>
63+ <p class="formHelp">
64+ To open a new track, <a href="https://snapcraft.io/community">ask the store admins</a>.
65+ </p>
66+ </td>
67+ </tr>
68+ </table>
69 </td>
70 </tr>
71 </table>