|
5 | 5 | import 'package:jaspr/jaspr.dart'; |
6 | 6 | import 'package:jaspr_content/jaspr_content.dart'; |
7 | 7 |
|
| 8 | +import 'feedback.dart'; |
| 9 | + |
8 | 10 | /// The trailing content of a content documentation page, such as |
9 | 11 | /// its last updated information, report an issue links, and similar. |
10 | 12 | class TrailingContent extends StatelessComponent { |
@@ -50,90 +52,7 @@ class TrailingContent extends StatelessComponent { |
50 | 52 | id: 'trailing-content', |
51 | 53 | attributes: {'data-nosnippet': 'true'}, |
52 | 54 | [ |
53 | | - div(id: 'page-feedback', [ |
54 | | - div(classes: 'feedback initial-feedback', [ |
55 | | - div([text('Was this page\'s content helpful?')]), |
56 | | - div(classes: 'feedback-buttons', [ |
57 | | - button( |
58 | | - id: 'feedback-up-button', |
59 | | - classes: 'icon-button', |
60 | | - attributes: { |
61 | | - 'aria-label': 'Yes, this page was helpful', |
62 | | - 'title': 'Helpful', |
63 | | - }, |
64 | | - [ |
65 | | - span( |
66 | | - classes: 'material-symbols', |
67 | | - attributes: {'aria-hidden': 'true'}, |
68 | | - [text('thumb_up')], |
69 | | - ), |
70 | | - ], |
71 | | - ), |
72 | | - button( |
73 | | - id: 'feedback-down-button', |
74 | | - classes: 'icon-button', |
75 | | - attributes: { |
76 | | - 'aria-label': 'No, this page was not helpful or had an issue', |
77 | | - 'title': 'Not helpful or had issue', |
78 | | - }, |
79 | | - [ |
80 | | - span( |
81 | | - classes: 'material-symbols', |
82 | | - attributes: {'aria-hidden': 'true'}, |
83 | | - [text('thumb_down')], |
84 | | - ), |
85 | | - ], |
86 | | - ), |
87 | | - ]), |
88 | | - ]), |
89 | | - |
90 | | - div(classes: 'feedback good-feedback', [ |
91 | | - div([text('Thank you for your feedback!')]), |
92 | | - a( |
93 | | - href: issueUrl, |
94 | | - classes: 'text-button', |
95 | | - attributes: { |
96 | | - 'aria-label': 'Provide feedback', |
97 | | - 'target': '_blank', |
98 | | - 'rel': 'noopener', |
99 | | - }, |
100 | | - [ |
101 | | - span( |
102 | | - classes: 'material-symbols', |
103 | | - attributes: {'aria-hidden': 'true'}, |
104 | | - [text('feedback')], |
105 | | - ), |
106 | | - span([text('Provide details')]), |
107 | | - ], |
108 | | - ), |
109 | | - ]), |
110 | | - |
111 | | - div(classes: 'feedback bad-feedback', [ |
112 | | - div([ |
113 | | - text( |
114 | | - 'Thank you for your feedback!' |
115 | | - 'Please let us know what we can do to improve.', |
116 | | - ), |
117 | | - ]), |
118 | | - a( |
119 | | - href: issueUrl, |
120 | | - classes: 'text-button', |
121 | | - attributes: { |
122 | | - 'aria-label': 'Provide feedback or report an issue', |
123 | | - 'target': '_blank', |
124 | | - 'rel': 'noopener', |
125 | | - }, |
126 | | - [ |
127 | | - span( |
128 | | - classes: 'material-symbols', |
129 | | - attributes: {'aria-hidden': 'true'}, |
130 | | - [text('bug_report')], |
131 | | - ), |
132 | | - span([text('Provide details')]), |
133 | | - ], |
134 | | - ), |
135 | | - ]), |
136 | | - ]), |
| 55 | + FeedbackComponent(issueUrl: issueUrl), |
137 | 56 |
|
138 | 57 | p(id: 'page-github-links', [ |
139 | 58 | span([ |
|
0 commit comments