Skip to content

Commit 7fecc0b

Browse files
committed
Dev environment - Improve manual-testing UI
1 parent d0bbdc2 commit 7fecc0b

File tree

1 file changed

+63
-11
lines changed

1 file changed

+63
-11
lines changed

TestingArena/Box.vue

Lines changed: 63 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -141,38 +141,54 @@ const highlightedConfig = computed(() => {
141141
</div>
142142

143143
<div v-if="$slots.responsive" style="margin-left:1rem">
144-
Reponsive (Local component)
144+
<div class="title">
145+
<div class="tag"><BaseIcon name="resize" :size="16" stroke="#1A1A1A" />Responsive</div> {{ comp }} (Local)
146+
</div>
145147
<slot name="responsive"/>
146148
</div>
147149

148150
<div style="width: 100%; max-width: 600px; padding: 12px" v-if="comp">
149-
<div style="margin: 12px 0; color: grey">Default config (local VueDataUi universal component, knobs don't apply):</div>
151+
<div class="title">
152+
<div class="tag"><BaseIcon name="settings" :size="16" stroke="#1A1A1A" />Default config</div> {{ comp }} (local VueDataUi universal component, knobs don't apply)
153+
</div>
150154
<LocalVueDataUi :component="comp" :dataset="dataset"/>
151155
</div>
152156

153157
<div class="box">
154-
<div style="width:100%; max-width: 600px">
155-
<p>Local (default config with theme only, knobs don't apply)</p>
158+
<div style="width:100%; max-width: 600px" v-if="$slots.theme">
159+
<div class="title">
160+
<div class="tag"><BaseIcon name="palette" :size="16" stroke="#1A1A1A" />Theme only</div> {{ comp }} (local, knobs don't apply)
161+
</div>
156162
<slot name="theme"/>
157163
</div>
158164
<div style="width:100%; max-width: 600px">
159-
<p>Local</p>
165+
<div class="title">
166+
<div class="tag"><BaseIcon name="curlySpread" :size="16" stroke="#1A1A1A" />Local</div> {{ comp }}
167+
</div>
160168
<slot name="local"/>
161169
</div>
162170
<div style="width:100%; max-width: 600px">
163-
<p>VueDataUi Local</p>
171+
<div class="title">
172+
<div class="tag"><BaseIcon name="curlySpread" :size="16" stroke="#1A1A1A" />VueDataUi universal</div> (local)
173+
</div>
164174
<slot name="VDUI-local"/>
165175
</div>
166176
<div style="width: 100%; max-width: 600px">
167-
<p>Build (legacy import)</p>
177+
<div class="title">
178+
<div class="tag"><BaseIcon name="boxes" :size="16" stroke="#1A1A1A" />Build legacy import</div>{{ comp }}
179+
</div>
168180
<slot name="build"/>
169181
</div>
170182
<div style="width: 100%; max-width: 600px">
171-
<p>Build (treeshaking import)</p>
183+
<div class="title">
184+
<div class="tag"><BaseIcon name="boxes" :size="16" stroke="#1A1A1A" />Treeshaken build</div>{{ comp }}
185+
</div>
172186
<slot name="build-treesh"/>
173187
</div>
174188
<div style="width: 100%; max-width: 600px">
175-
<p>VueDataUi build</p>
189+
<div class="title">
190+
<div class="tag"><BaseIcon name="vueDataUi" :size="16" stroke="#1A1A1A" />VueDataUi universal build</div>
191+
</div>
176192
<slot name="VDUI-build"/>
177193
</div>
178194
</div>
@@ -187,10 +203,12 @@ const highlightedConfig = computed(() => {
187203
COPYING<span style="color:#42d392">........</span>
188204
</code>
189205
</button>
190-
<div style="margin-top: 1rem; display:flex;align-items:center;gap:0.5rem; background:#ffbb7820; padding: 0.5rem 1rem">
206+
<div style="margin-top: 1rem; display:flex;align-items:start;gap:0.5rem; background:#ffbb7820; padding: 0.5rem 1rem">
191207
<BaseIcon name="triangle" stroke="#ff7f0e" :size="20"/>
192208
<span style="color:#ffbb78">
193-
Callbacks are displayed inside quotes to be <i>readable</i>
209+
Callbacks are displayed inside quotes to be <i>readable</i>.<br>
210+
This config is derived from the model created in the <code style="color:#66DDAA;background:#66DDAA20;padding: 0 0.5rem">Arena{{ props.comp }}.vue</code> file and is partial.<br>
211+
The library component resolves the model's missing config attributes from the <code style="color:#fdd663;background:#fdd66320;padding:0 0.5rem">useConfig.js</code> definition.
194212
</span>
195213
</div>
196214
<div class="config">
@@ -203,6 +221,30 @@ const highlightedConfig = computed(() => {
203221
</template>
204222

205223
<style scoped>
224+
.title {
225+
padding: 1rem;
226+
background: #5f8aee20;
227+
color: #5f8aee;
228+
display: flex;
229+
align-items:center;
230+
gap: 0.5rem;
231+
}
232+
233+
.tag {
234+
padding: 0 0.5rem;
235+
border-radius: 1rem;
236+
background: radial-gradient(at top left, #83a4f2, #5f8aee);
237+
color: #1A1A1A;
238+
width: fit-content;
239+
display: flex;
240+
flex-direction: row;
241+
align-items:center;
242+
gap: 0.5rem;
243+
flex-wrap: nowrap;
244+
justify-content:center;
245+
white-space: nowrap;
246+
}
247+
206248
summary {
207249
color: white;
208250
user-select: none;
@@ -225,6 +267,7 @@ h1, p {
225267
max-width: 1600px;
226268
margin: 0 auto;
227269
}
270+
228271
.config {
229272
color: #CCCCCC;
230273
padding: 1rem !important;
@@ -274,4 +317,13 @@ h1, p {
274317
.btn:hover {
275318
background-color: #5A5A5A;
276319
}
320+
321+
@media screen and (max-width: 1000px) {
322+
.box {
323+
grid-template-columns: repeat(1, 1fr);
324+
}
325+
.knobs {
326+
width: 400px;
327+
}
328+
}
277329
</style>

0 commit comments

Comments
 (0)