Skip to content

Commit 6d34fd3

Browse files
Barthélémy LedouxmarktnoonanZachJW34
authored
fix: clean up some unexpected behavior and designs (#21551)
* refactor: try removing the safelist * fix open browser bugs * add ts in windi observed files * resolve typescript issue * remove markdown code class * fix automation disconnected button color * fix disabled card * fix retry button * fix config warning test * fix color of topnav * fix browser dropdown header text * remove the removing * revert unwanted change to card Co-authored-by: Mark Noonan <[email protected]> Co-authored-by: Zachary Williams <[email protected]>
1 parent 152e828 commit 6d34fd3

File tree

9 files changed

+17
-15
lines changed

9 files changed

+17
-15
lines changed

packages/app/src/runner/SpecRunnerDropdown.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@
1313
:disabled="props.disabled"
1414
>
1515
<div
16-
class="flex text-gray-600 gap-8px items-center"
16+
class="flex gap-8px items-center"
1717
:class="{
1818
'group-hocus:text-indigo-600': !props.disabled,
1919
'text-indigo-600': open,
20+
'text-gray-600': !open,
2021
}"
2122
>
2223
<slot

packages/app/src/runner/automation/AutomationDisconnected.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@
1212
{{ t('runner.automation.disconnected.description') }}
1313
</p>
1414
<Button
15-
class="bg-indigo-500 text-white"
1615
size="md"
17-
variant="outline"
1816
:prefix-icon="RefreshIcon"
1917
prefix-icon-class="icon-dark-white"
2018
@click="relaunch"

packages/frontend-shared/src/components/Card.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@
4040
<!-- this button can be focused via tab key and allows card hocus styles to appear
4141
as well as allows a keyboard user to "activate" the card with spacebar or enter keys -->
4242
<button
43-
class="font-medium mx-8px mb-8px text-indigo-500 text-18px leading-24px focus:outline-transparent"
43+
class="font-medium mx-8px mb-8px text-18px leading-24px focus:outline-transparent"
4444
:class="{
45-
'text-gray-700 cursor-default': disabled
45+
'text-gray-700 cursor-default': disabled,
46+
'text-indigo-500': !disabled
4647
}"
4748
:disabled="disabled"
4849
>

packages/frontend-shared/src/composables/useMarkdown.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const defaultClasses = {
4141
h6: ['font-medium', 'text-xs', 'mb-3'],
4242
p: ['my-3 first:mt-0 text-sm mb-4'],
4343
pre: ['rounded p-3 bg-white mb-2'],
44-
code: [`font-medium rounded text-sm px-4px py-2px bg-red-100`],
44+
code: ['font-medium rounded text-sm px-4px py-2px'],
4545
a: ['text-blue-500', 'hover:underline text-sm'],
4646
ul: ['list-disc pl-6 my-3 text-sm'],
4747
ol: ['list-decimal pl-6 my-3 text-sm'],

packages/frontend-shared/src/gql-components/topnav/TopNav.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,12 @@
106106
>
107107
<template #heading="{ open }">
108108
<img
109+
v-if="props.gql?.currentProject?.activeBrowser?.displayName"
109110
class="w-16px filter group-hocus:grayscale-0"
110111
data-cy="top-nav-active-browser-icon"
111112
:alt="props.gql?.currentProject?.activeBrowser?.displayName"
112113
:class="open ? 'grayscale-0' : 'grayscale'"
113-
:src="allBrowsersIcons[props.gql?.currentProject?.activeBrowser?.displayName] || allBrowsersIcons.generic"
114+
:src="allBrowsersIcons[props.gql.currentProject.activeBrowser.displayName] || allBrowsersIcons.generic"
114115
>
115116
<span
116117
data-cy="top-nav-active-browser"

packages/frontend-shared/src/gql-components/topnav/TopNavList.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
@click="emit('clearForceOpen')"
99
>
1010
<div
11-
class="flex text-gray-600 gap-8px items-center group-hocus:text-indigo-600"
12-
:class="(open || props.forceOpenState) ? 'text-indigo-600' : ''"
11+
class="flex gap-8px items-center group-hocus:text-indigo-600"
12+
:class="(open || props.forceOpenState) ? 'text-indigo-600' : 'text-gray-600'"
1313
>
1414
<slot
1515
name="heading"

packages/frontend-shared/src/warning/Warning.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,12 @@
1414
/>
1515
<Button
1616
v-if="retryable"
17-
class="bg-indigo-500 text-white"
1817
size="md"
19-
variant="outline"
2018
:prefix-icon="RefreshIcon"
2119
prefix-icon-class="icon-dark-white"
2220
@click="emits('retry')"
2321
>
24-
Retry
22+
{{ t('warnings.retry') }}
2523
</Button>
2624
</Alert>
2725
</template>
@@ -34,6 +32,9 @@ import Button from '@cy/components/Button.vue'
3432
import RefreshIcon from '~icons/cy/refresh_x16'
3533
import { computed, ref } from 'vue'
3634
import { useVModels } from '@vueuse/core'
35+
import { useI18n } from '@cy/i18n'
36+
37+
const { t } = useI18n()
3738
3839
const emits = defineEmits<{
3940
(eventName: 'update:modelValue', value: boolean): void

packages/launchpad/cypress/e2e/config-warning.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ describe('baseUrl', () => {
1111
sinon.stub(ctx._apis.projectApi, 'isListening').resolves(undefined)
1212
})
1313

14-
cy.contains('button', 'Retry').click()
14+
cy.contains('button', 'Try again').click()
1515
cy.get('[data-cy="alert"]').should('not.exist')
1616
})
1717

packages/launchpad/src/setup/OpenBrowserList.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@
5353
>
5454
</div>
5555
<div
56-
class="font-medium pt-2 text-indigo-600 text-18px leading-28px"
57-
:class="{ 'text-jade-600': checked, 'text-gray-500': browser.disabled || !browser.isVersionSupported }"
56+
class="font-medium pt-2 text-18px leading-28px"
57+
:class="checked ? 'text-jade-600' : ( browser.disabled || !browser.isVersionSupported ) ? 'text-gray-500' : 'text-indigo-600'"
5858
>
5959
{{ browser.displayName }}
6060
</div>

0 commit comments

Comments
 (0)