Skip to content

Commit

Permalink
fix: clean up some unexpected behavior and designs (#21551)
Browse files Browse the repository at this point in the history
* 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 <mark@cypress.io>
Co-authored-by: Zachary Williams <ZachJW34@gmail.com>
  • Loading branch information
3 people committed Jun 21, 2022
1 parent 152e828 commit 6d34fd3
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 15 deletions.
3 changes: 2 additions & 1 deletion packages/app/src/runner/SpecRunnerDropdown.vue
Expand Up @@ -13,10 +13,11 @@
:disabled="props.disabled"
>
<div
class="flex text-gray-600 gap-8px items-center"
class="flex gap-8px items-center"
:class="{
'group-hocus:text-indigo-600': !props.disabled,
'text-indigo-600': open,
'text-gray-600': !open,
}"
>
<slot
Expand Down
2 changes: 0 additions & 2 deletions packages/app/src/runner/automation/AutomationDisconnected.vue
Expand Up @@ -12,9 +12,7 @@
{{ t('runner.automation.disconnected.description') }}
</p>
<Button
class="bg-indigo-500 text-white"
size="md"
variant="outline"
:prefix-icon="RefreshIcon"
prefix-icon-class="icon-dark-white"
@click="relaunch"
Expand Down
5 changes: 3 additions & 2 deletions packages/frontend-shared/src/components/Card.vue
Expand Up @@ -40,9 +40,10 @@
<!-- this button can be focused via tab key and allows card hocus styles to appear
as well as allows a keyboard user to "activate" the card with spacebar or enter keys -->
<button
class="font-medium mx-8px mb-8px text-indigo-500 text-18px leading-24px focus:outline-transparent"
class="font-medium mx-8px mb-8px text-18px leading-24px focus:outline-transparent"
:class="{
'text-gray-700 cursor-default': disabled
'text-gray-700 cursor-default': disabled,
'text-indigo-500': !disabled
}"
:disabled="disabled"
>
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend-shared/src/composables/useMarkdown.ts
Expand Up @@ -41,7 +41,7 @@ const defaultClasses = {
h6: ['font-medium', 'text-xs', 'mb-3'],
p: ['my-3 first:mt-0 text-sm mb-4'],
pre: ['rounded p-3 bg-white mb-2'],
code: [`font-medium rounded text-sm px-4px py-2px bg-red-100`],
code: ['font-medium rounded text-sm px-4px py-2px'],
a: ['text-blue-500', 'hover:underline text-sm'],
ul: ['list-disc pl-6 my-3 text-sm'],
ol: ['list-decimal pl-6 my-3 text-sm'],
Expand Down
Expand Up @@ -106,11 +106,12 @@
>
<template #heading="{ open }">
<img
v-if="props.gql?.currentProject?.activeBrowser?.displayName"
class="w-16px filter group-hocus:grayscale-0"
data-cy="top-nav-active-browser-icon"
:alt="props.gql?.currentProject?.activeBrowser?.displayName"
:class="open ? 'grayscale-0' : 'grayscale'"
:src="allBrowsersIcons[props.gql?.currentProject?.activeBrowser?.displayName] || allBrowsersIcons.generic"
:src="allBrowsersIcons[props.gql.currentProject.activeBrowser.displayName] || allBrowsersIcons.generic"
>
<span
data-cy="top-nav-active-browser"
Expand Down
Expand Up @@ -8,8 +8,8 @@
@click="emit('clearForceOpen')"
>
<div
class="flex text-gray-600 gap-8px items-center group-hocus:text-indigo-600"
:class="(open || props.forceOpenState) ? 'text-indigo-600' : ''"
class="flex gap-8px items-center group-hocus:text-indigo-600"
:class="(open || props.forceOpenState) ? 'text-indigo-600' : 'text-gray-600'"
>
<slot
name="heading"
Expand Down
7 changes: 4 additions & 3 deletions packages/frontend-shared/src/warning/Warning.vue
Expand Up @@ -14,14 +14,12 @@
/>
<Button
v-if="retryable"
class="bg-indigo-500 text-white"
size="md"
variant="outline"
:prefix-icon="RefreshIcon"
prefix-icon-class="icon-dark-white"
@click="emits('retry')"
>
Retry
{{ t('warnings.retry') }}
</Button>
</Alert>
</template>
Expand All @@ -34,6 +32,9 @@ import Button from '@cy/components/Button.vue'
import RefreshIcon from '~icons/cy/refresh_x16'
import { computed, ref } from 'vue'
import { useVModels } from '@vueuse/core'
import { useI18n } from '@cy/i18n'
const { t } = useI18n()
const emits = defineEmits<{
(eventName: 'update:modelValue', value: boolean): void
Expand Down
2 changes: 1 addition & 1 deletion packages/launchpad/cypress/e2e/config-warning.cy.ts
Expand Up @@ -11,7 +11,7 @@ describe('baseUrl', () => {
sinon.stub(ctx._apis.projectApi, 'isListening').resolves(undefined)
})

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

Expand Down
4 changes: 2 additions & 2 deletions packages/launchpad/src/setup/OpenBrowserList.vue
Expand Up @@ -53,8 +53,8 @@
>
</div>
<div
class="font-medium pt-2 text-indigo-600 text-18px leading-28px"
:class="{ 'text-jade-600': checked, 'text-gray-500': browser.disabled || !browser.isVersionSupported }"
class="font-medium pt-2 text-18px leading-28px"
:class="checked ? 'text-jade-600' : ( browser.disabled || !browser.isVersionSupported ) ? 'text-gray-500' : 'text-indigo-600'"
>
{{ browser.displayName }}
</div>
Expand Down

5 comments on commit 6d34fd3

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 6d34fd3 Jun 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/10.2.0/linux-x64/develop-6d34fd33ac6b9ff93cd9d8e1250ff0b1ed76b31a/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 6d34fd3 Jun 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux arm64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/10.2.0/linux-arm64/develop-6d34fd33ac6b9ff93cd9d8e1250ff0b1ed76b31a/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 6d34fd3 Jun 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the win32 x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/10.2.0/win32-x64/develop-6d34fd33ac6b9ff93cd9d8e1250ff0b1ed76b31a/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 6d34fd3 Jun 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin arm64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/10.2.0/darwin-arm64/develop-6d34fd33ac6b9ff93cd9d8e1250ff0b1ed76b31a/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 6d34fd3 Jun 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/10.2.0/darwin-x64/develop-6d34fd33ac6b9ff93cd9d8e1250ff0b1ed76b31a/cypress.tgz

Please sign in to comment.