Commit 42a643d
committed
refactor(audience-sample): centralise UXML / CSS / message strings into SampleAppUi
Moves the SampleAppUi catalogue from Tests/Runtime to Scripts so
non-test code can reference it, and expands it to cover every UXML
element name, CSS class, button caption, resource path, and side
string the sample manipulates.
- Moves SampleAppUi.cs from Tests/Runtime to Scripts so AudienceSample.cs / .UI.cs / .Events.cs can reference it.
- SampleAppUi gains AliasFromType / AliasToType identity-field names.
- SampleAppUi.Layout names the layout-internal elements (sdk-version, tab-bar, typed-events-host, log-resize-handle, page-scroll, controls-column, log-column, sample-app-grid, log-count, accordion-{item, title, content}).
- SampleAppUi.Css names every CSS class the sample manipulates (state-*, accordion-*, log-*, badge-*, status-value, field-*, etc.).
- SampleAppUi.ButtonText (Send / Copy / Copied) names dynamically-built button captions.
- SampleAppUi.Resources names the four Resources.Load asset paths.
- SampleAppUi.Messages holds six human-readable side strings used in consent / identity flows.
- SampleAppUi.LogLabels gains Ready / Sdk / OnError / Init / Shutdown / Reset / Flush / DeleteData / Page / Track / SetConsent.
- SampleAppUi.LogBadgeText names the two-letter SDK / APP pill text.
- SampleAppUi.StatusBar.EmptyText replaces six hardcoded em-dash placeholder glyphs.
- AudienceSample.cs / .UI.cs / .Events.cs read UXML element names, CSS classes, dynamic button captions, resource paths, and log labels from SampleAppUi.
- SampleAppLiveFireTests.cs reads UXML element names, log labels, and the env-var key from SampleAppUi.1 parent 153f25f commit 42a643d
7 files changed
Lines changed: 524 additions & 380 deletions
File tree
- examples/audience/Assets/SampleApp
- Scripts
- Tests/Runtime
Lines changed: 39 additions & 33 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
41 | 54 | | |
42 | 55 | | |
43 | 56 | | |
| |||
63 | 76 | | |
64 | 77 | | |
65 | 78 | | |
66 | | - | |
| 79 | + | |
67 | 80 | | |
68 | 81 | | |
69 | 82 | | |
70 | 83 | | |
71 | 84 | | |
72 | 85 | | |
73 | 86 | | |
74 | | - | |
| 87 | + | |
75 | 88 | | |
76 | 89 | | |
77 | 90 | | |
| |||
103 | 116 | | |
104 | 117 | | |
105 | 118 | | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
111 | 124 | | |
112 | 125 | | |
113 | 126 | | |
114 | 127 | | |
115 | 128 | | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
120 | 133 | | |
121 | 134 | | |
122 | 135 | | |
123 | 136 | | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
130 | 143 | | |
131 | 144 | | |
132 | | - | |
| 145 | + | |
133 | 146 | | |
134 | 147 | | |
135 | 148 | | |
136 | 149 | | |
137 | 150 | | |
138 | 151 | | |
139 | 152 | | |
140 | | - | |
| 153 | + | |
141 | 154 | | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
149 | 158 | | |
150 | 159 | | |
151 | 160 | | |
152 | 161 | | |
153 | | - | |
| 162 | + | |
154 | 163 | | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
161 | 167 | | |
162 | 168 | | |
163 | 169 | | |
| |||
0 commit comments