Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor icons: harmonize contextually, use filled status icons #4584

Merged
merged 49 commits into from
Dec 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
bdd7c96
use more outline icons
pat-s Dec 18, 2024
f26730b
chore: fix mdiTrashCanOutline
pat-s Dec 18, 2024
6641fe0
update more icons
pat-s Dec 18, 2024
73c7303
[pre-commit.ci] auto fixes from pre-commit.com hooks [CI SKIP]
pre-commit-ci[bot] Dec 18, 2024
20ff9f3
update forge icons
pat-s Dec 18, 2024
2c71f4f
add devicon
pat-s Dec 18, 2024
6a40a0a
add updated package.json
pat-s Dec 18, 2024
b490b34
use iconify/vue icons
pat-s Dec 18, 2024
7287092
test
pat-s Dec 18, 2024
3f05656
.
pat-s Dec 18, 2024
7240547
add all icons via iconfiy
pat-s Dec 18, 2024
e4bbceb
clean
pat-s Dec 18, 2024
aafa065
Merge branch 'main' into feat/outline-icons
pat-s Dec 22, 2024
a652982
use w-9 h-9
pat-s Dec 22, 2024
ef05f49
more circle outline icons
pat-s Dec 22, 2024
aa72b74
use health potion instead of bandage
pat-s Dec 22, 2024
fe2031d
use wrenchCogOutline
pat-s Dec 22, 2024
53efc5e
use filled icons for status and regular instead of outlined
pat-s Dec 27, 2024
fe9a56d
format
pat-s Dec 27, 2024
de8c23e
Merge branch 'main' into feat/outline-icons
pat-s Dec 27, 2024
a283162
revert lock, play and plus
pat-s Dec 27, 2024
ac6ef02
rev github
pat-s Dec 27, 2024
0003a35
format
pat-s Dec 27, 2024
8314c85
rev pencil, use cogOutline for admin panels
pat-s Dec 27, 2024
6eb4c83
use cogOutlined for admin panels, set 1.3rem
pat-s Dec 27, 2024
cffb562
set w-9 h-9 consistently
pat-s Dec 27, 2024
042d216
use relative forge icon sizes
pat-s Dec 27, 2024
5112c20
align run pipeline icon with line height
pat-s Dec 27, 2024
cdedd4d
use pencilOutline
pat-s Dec 27, 2024
93d8657
use playOutline
pat-s Dec 27, 2024
403c88d
adjust play icons
pat-s Dec 27, 2024
c6181b4
align sizing and default color for agent queue play button icon
pat-s Dec 27, 2024
226e233
use playOutline for cron
pat-s Dec 27, 2024
1e85394
adminqueue
pat-s Dec 27, 2024
f0ff416
add required class for normal state
pat-s Dec 27, 2024
2c9b5e3
format
pat-s Dec 27, 2024
9084258
w-9 h-9, 1.2rem
pat-s Dec 27, 2024
a0d59bc
back to 1.3rem
pat-s Dec 27, 2024
3db964b
harmonize status icons
pat-s Dec 29, 2024
d9366f6
Merge branch 'main' into feat/outline-icons
pat-s Dec 29, 2024
5302851
use filled status icons
pat-s Dec 29, 2024
b7a3ec7
format
pat-s Dec 29, 2024
e70242b
Update web/src/components/atomic/Icon.vue
pat-s Dec 29, 2024
9d63e43
last missing circle icon
pat-s Dec 29, 2024
a262dcb
cleanup
xoxys Dec 29, 2024
fb6e934
Merge branch 'main' into feat/outline-icons
xoxys Dec 29, 2024
814274b
cleanup (2) and add back gitlab icon
xoxys Dec 29, 2024
5c92305
Merge branch 'main' into feat/outline-icons
pat-s Dec 30, 2024
5c39df0
Merge branch 'main' into feat/outline-icons
pat-s Dec 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion web/src/components/atomic/Button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
:disabled="disabled"
>
<slot>
<Icon v-if="startIcon" :name="startIcon" class="!w-6 !h-6" :class="{ invisible: isLoading, 'mr-1': text }" />
<Icon v-if="startIcon" :name="startIcon" class="!w-5 !h-5" :class="{ invisible: isLoading, 'mr-1': text }" />
<span :class="{ invisible: isLoading }">{{ text }}</span>
<Icon v-if="endIcon" :name="endIcon" class="ml-2 w-6 h-6" :class="{ invisible: isLoading }" />
<div
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/atomic/Error.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div
class="flex items-center gap-2 border-wp-error-300 dark:border-wp-error-300 bg-wp-error-100 dark:bg-wp-error-200 p-2 border border-l-6 border-solid rounded-md text-white"
>
<Icon v-if="!textOnly" name="error" />
<Icon v-if="!textOnly" name="alert" />
<slot>
<span class="whitespace-pre">{{ text }}</span>
</slot>
Expand Down
84 changes: 40 additions & 44 deletions web/src/components/atomic/Icon.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- cSpell:ignore radiobox timelapse -->
<template>
<SvgIcon v-if="name === 'duration'" :path="mdiTimelapse" size="1.3rem" />
<SvgIcon v-if="name === 'duration'" :path="mdiTimerOutline" size="1.3rem" />
<SvgIcon v-else-if="name === 'since'" :path="mdiClockTimeEightOutline" size="1.3rem" />
<SvgIcon v-else-if="name === 'push'" :path="mdiSourceBranch" size="1.3rem" />
<SvgIcon v-else-if="name === 'pull-request'" :path="mdiSourcePull" size="1.3rem" />
Expand All @@ -10,16 +10,17 @@
<SvgIcon v-else-if="name === 'deployment'" :path="mdiPackageVariant" size="1.3rem" />
<SvgIcon v-else-if="name === 'commit'" :path="mdiSourceCommit" size="1.3rem" />
<SvgIcon v-else-if="name === 'back'" :path="mdiArrowLeft" size="1.3rem" />
<SvgIcon v-else-if="name === 'github'" :path="mdiGithub" size="32" />
<SvgIcon v-else-if="name === 'repo'" :path="mdiGit" size="32" />
<SvgIcon v-else-if="name === 'settings'" :path="mdiCog" size="32" />
<SvgIcon v-else-if="name === 'github'" :path="mdiGithub" size="1.3rem" />
<SvgIcon v-else-if="name === 'repo'" :path="mdiGit" size="1.3rem" />
<SvgIcon v-else-if="name === 'settings'" :path="mdiCog" size="1.3rem" />
<SvgIcon v-else-if="name === 'settings-outline'" :path="mdiCogOutline" size="1.3rem" />
<SvgIcon v-else-if="name === 'trash'" :path="mdiTrashCanOutline" size="1.3rem" />
<SvgIcon v-else-if="name === 'status-blocked'" :path="mdiPlayCircleOutline" size="1.3rem" />
<SvgIcon v-else-if="name === 'status-declined'" :path="mdiStopCircleOutline" size="1.3rem" />
<SvgIcon v-else-if="name === 'status-blocked'" :path="mdiPlayCircle" size="1.3rem" />
<SvgIcon v-else-if="name === 'status-declined'" :path="mdiStopCircle" size="1.3rem" />
<SvgIcon
v-else-if="name === 'status-failure' || name === 'status-error' || name === 'status-killed'"
type="mdi"
:path="mdiCloseCircleOutline"
:path="mdiCloseCircle"
size="1.3rem"
/>
<SvgIcon v-else-if="name === 'status-pending'" :path="mdiRadioboxBlank" size="1.3rem" />
Expand All @@ -29,34 +30,32 @@
:path="mdiRadioboxIndeterminateVariant"
size="1.3rem"
/>
<SvgIcon v-else-if="name === 'status-skipped'" :path="mdiMinusCircleOutline" size="1.3rem" />
<SvgIcon v-else-if="name === 'status-success'" :path="mdiCheckCircleOutline" size="1.3rem" />
<SvgIcon v-else-if="name === 'attention'" :path="mdiAlert" size="1.3rem" />
<SvgIcon v-else-if="name === 'warning'" :path="mdiAlertOutline" size="1.3rem" />
<SvgIcon v-else-if="name === 'error'" :path="mdiAlertCircle" size="1.3rem" />
<SvgIcon v-else-if="name === 'gitlab'" :path="mdiGitlab" size="32" />
<SvgIcon v-else-if="name === 'bitbucket' || name === 'bitbucket-dc'" :path="mdiBitbucket" size="32" />
<SvgIcon v-else-if="name === 'question'" :path="mdiHelpCircleOutline" size="1.3rem" />
<SvgIcon v-else-if="name === 'status-skipped'" :path="mdiMinusCircle" size="1.3rem" />
<SvgIcon v-else-if="name === 'status-success'" :path="mdiCheckCircle" size="1.3rem" />
<SvgIcon v-else-if="name === 'alert'" :path="mdiAlertCircle" size="1.3rem" />
<SvgIcon v-else-if="name === 'question'" :path="mdiHelpCircle" size="1.3rem" />
<SvgIcon v-else-if="name === 'plus'" :path="mdiPlus" size="1.3rem" />
<SvgIcon v-else-if="name === 'list'" :path="mdiFormatListBulleted" size="1.3rem" />
<SvgIcon v-else-if="name === 'heal'" :path="mdiBandage" size="1.3rem" />
<SvgIcon v-else-if="name === 'heal'" :path="mdiWrenchCogOutline" size="1.3rem" />
xoxys marked this conversation as resolved.
Show resolved Hide resolved
<SvgIcon v-else-if="name === 'turn-off'" :path="mdiPower" size="1.3rem" />
<SvgIcon v-else-if="name === 'chevron-right'" :path="mdiChevronRight" size="1.3rem" />
<SvgIcon v-else-if="name === 'close'" :path="mdiCloseCircleOutline" size="1.3rem" />
<SvgIcon v-else-if="name === 'edit'" :path="mdiPencil" size="1.3rem" />
<SvgIcon v-else-if="name === 'download'" :path="mdiDownloadCircle" size="1.3rem" />
<SvgIcon v-else-if="name === 'close'" :path="mdiCloseCircle" size="1.3rem" />
<SvgIcon v-else-if="name === 'edit'" :path="mdiPencilOutline" size="1.3rem" />
<SvgIcon v-else-if="name === 'download'" :path="mdiDownloadOutline" size="1.3rem" />
<SvgIcon v-else-if="name === 'stopwatch'" :path="mdiAlarm" size="1.3rem" />
<SvgIcon v-else-if="name === 'auto-scroll'" :path="mdiDownload" size="1.3rem" />
<SvgIcon v-else-if="name === 'auto-scroll-off'" :path="mdiDownloadOff" size="1.3rem" />
<SvgIcon v-else-if="name === 'auto-scroll'" :path="mdiEyeOutline" size="1.3rem" />
<SvgIcon v-else-if="name === 'auto-scroll-off'" :path="mdiEyeOffOutline" size="1.3rem" />
<SvgIcon v-else-if="name === 'pause'" :path="mdiPause" size="1.3rem" />
<SvgIcon v-else-if="name === 'play'" :path="mdiPlay" size="1.3rem" />
<SvgIcon v-else-if="name === 'remove'" :path="mdiClose" size="1.3rem" />
<SvgIcon v-else-if="name === 'play-outline'" :path="mdiPlayOutline" size="1.3rem" />

<SvgIcon v-else-if="name === 'visibility-private'" :path="mdiLockOutline" size="1.3rem" />
<SvgIcon v-else-if="name === 'visibility-internal'" :path="mdiLockOpenOutline" size="1.3rem" />

<SvgIcon v-else-if="name === 'forgejo'" :path="siForgejo.path" size="32" />
<SvgIcon v-else-if="name === 'gitea'" :path="siGitea.path" size="32" />
<SvgIcon v-else-if="name === 'forgejo'" :path="siForgejo.path" size="1.3rem" />
<SvgIcon v-else-if="name === 'gitea'" :path="siGitea.path" size="1.3rem" />
<SvgIcon v-else-if="name === 'gitlab'" :path="mdiGitlab" size="1.3rem" />
<SvgIcon v-else-if="name === 'bitbucket' || name === 'bitbucket-dc'" :path="mdiBitbucket" size="1.3" />

<svg v-else-if="name === 'spinner'" width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path
Expand Down Expand Up @@ -84,35 +83,33 @@
<script lang="ts" setup>
import {
mdiAlarm,
mdiAlert,
mdiAlertCircle,
mdiAlertOutline,
mdiArrowLeft,
mdiBandage,
mdiBitbucket,
mdiCheckCircleOutline,
mdiCheckCircle,
mdiChevronRight,
mdiClockTimeEightOutline,
mdiClose,
mdiCloseCircleOutline,
mdiCloseCircle,
mdiCog,
mdiDownload,
mdiDownloadCircle,
mdiDownloadOff,
mdiCogOutline,
mdiDownloadOutline,
mdiEyeOffOutline,
mdiEyeOutline,
mdiFormatListBulleted,
mdiGestureTap,
mdiGit,
mdiGithub,
mdiGitlab,
mdiHelpCircleOutline,
mdiHelpCircle,
mdiLockOpenOutline,
mdiLockOutline,
mdiMinusCircleOutline,
mdiMinusCircle,
mdiPackageVariant,
mdiPause,
mdiPencil,
mdiPencilOutline,
mdiPlay,
mdiPlayCircleOutline,
mdiPlayCircle,
mdiPlayOutline,
mdiPlus,
mdiPower,
mdiRadioboxBlank,
Expand All @@ -121,10 +118,11 @@ import {
mdiSourceCommit,
mdiSourceMerge,
mdiSourcePull,
mdiStopCircleOutline,
mdiStopCircle,
mdiTagOutline,
mdiTimelapse,
mdiTimerOutline,
mdiTrashCanOutline,
mdiWrenchCogOutline,
} from '@mdi/js';
import { siForgejo, siGitea } from 'simple-icons';

Expand All @@ -144,6 +142,7 @@ export type IconNames =
| 'github'
| 'repo'
| 'settings'
| 'settings-outline'
| 'trash'
| 'status-blocked'
| 'status-declined'
Expand Down Expand Up @@ -174,14 +173,11 @@ export type IconNames =
| 'download'
| 'auto-scroll'
| 'auto-scroll-off'
| 'refresh'
| 'play'
| 'play-outline'
| 'pause'
| 'warning'
| 'attention'
| 'alert'
| 'spinner'
| 'error'
| 'remove'
| 'visibility-private'
| 'visibility-internal';

Expand Down
2 changes: 1 addition & 1 deletion web/src/components/atomic/Warning.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div
class="flex gap-4 items-center text-gray-700 font-bold rounded-md p-4 border border-solid border-l-6 border-wp-hint-warn-200 bg-wp-hint-warn-100"
>
<Icon v-if="!textOnly" name="warning" class="flex-shrink-0" />
<Icon v-if="!textOnly" name="alert" class="flex-shrink-0" />
<slot>
<span class="whitespace-pre-wrap">{{ text }}</span>
</slot>
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/form/KeyValueEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
:title="deleteTitle"
@click="deleteItem(index)"
>
<Icon name="remove" />
<Icon name="close" />
</Button>
</div>
</div>
Expand Down
12 changes: 6 additions & 6 deletions web/src/components/layout/scaffold/Header.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<template>
<header
class="bg-wp-background-100 border-b-1 border-wp-background-400 dark:border-wp-background-100 dark:bg-wp-background-300 text-wp-text-100"
class="border-wp-background-400 dark:border-wp-background-100 bg-wp-background-100 dark:bg-wp-background-300 border-b-1 text-wp-text-100"
:class="{ 'md:px-4': fullWidth }"
>
<Container :full-width="fullWidth" class="!py-0">
<div class="flex w-full md:items-center flex-col py-3 gap-2 md:gap-10 md:flex-row md:justify-between">
<div class="flex md:flex-row flex-col md:justify-between md:items-center gap-2 md:gap-10 py-3 w-full">
<div
class="flex items-center content-start min-h-10"
:class="{
Expand All @@ -18,7 +18,7 @@
class="flex-shrink-0 mr-2 <md:hidden md:justify-between w-8 h-8"
@click="goBack"
/>
<h1 class="flex text-xl min-w-0 text-wp-text-100 items-center gap-x-2">
<h1 class="flex items-center gap-x-2 min-w-0 text-wp-text-100 text-xl">
<slot name="title" />
</h1>
</div>
Expand All @@ -32,7 +32,7 @@
/>
<div
v-if="$slots.headerActions"
class="flex items-center md:justify-end gap-x-2 min-w-0"
class="flex md:justify-end items-center gap-x-2 min-w-0"
:class="{
'md:flex-1': searchBoxPresent,
}"
Expand All @@ -41,9 +41,9 @@
</div>
</div>

<div v-if="enableTabs" class="flex md:items-center flex-col py-2 md:flex-row md:justify-between md:py-0">
<div v-if="enableTabs" class="flex md:flex-row flex-col md:justify-between md:items-center py-2 md:py-0">
<Tabs class="<md:order-2" />
<div v-if="$slots.headerActions" class="flex content-start md:justify-end">
<div v-if="$slots.headerActions" class="flex md:justify-end content-start">
<slot name="tabActions" />
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion web/src/views/admin/AdminOrgs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
:to="{ name: 'org', params: { orgId: org.id } }"
/>
<IconButton
icon="settings"
icon="settings-outline"
:title="$t('admin.settings.orgs.org_settings')"
class="w-8 h-8"
:to="{ name: 'org-settings', params: { orgId: org.id } }"
Expand Down
3 changes: 2 additions & 1 deletion web/src/views/admin/AdminQueue.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@
<Button v-else :text="$t('admin.settings.queue.pause')" start-icon="pause" @click="pauseQueue" />
<Icon
:name="queueInfo.paused ? 'pause' : 'play'"
class="w-6 h-6"
:class="{
'text-wp-error-100': queueInfo.paused,
'text-wp-state-ok-100': !queueInfo.paused,
'text-wp-text-100': !queueInfo.paused,
}"
/>
</div>
Expand Down
4 changes: 2 additions & 2 deletions web/src/views/admin/AdminRepos.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
class="items-center gap-2 !bg-wp-background-200 !dark:bg-wp-background-100"
>
<span>{{ repo.full_name }}</span>
<div class="ml-auto flex items-center">
<div class="flex items-center ml-auto">
<Badge v-if="!repo.active" class="<md:hidden mr-2" :label="$t('admin.settings.repos.disabled')" />
<IconButton
icon="chevron-right"
Expand All @@ -25,7 +25,7 @@
:to="{ name: 'repo', params: { repoId: repo.id } }"
/>
<IconButton
icon="settings"
icon="settings-outline"
:title="$t('admin.settings.repos.settings')"
class="w-8 h-8"
:to="{ name: 'repo-settings', params: { repoId: repo.id } }"
Expand Down
2 changes: 1 addition & 1 deletion web/src/views/repo/pipeline/PipelineErrors.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<div class="grid grid-cols-[minmax(10rem,auto),3fr]">
<span class="flex items-center gap-x-2">
<Icon
name="attention"
name="alert"
class="flex-shrink-0 my-1"
:class="{
'text-wp-state-warn-100': error.is_warning,
Expand Down
2 changes: 1 addition & 1 deletion web/src/views/repo/pipeline/PipelineWrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
<Tab
v-if="pipeline.errors && pipeline.errors.length > 0"
:to="{ name: 'repo-pipeline-errors' }"
icon="attention"
icon="alert"
:title="pipeline.errors.some((e) => !e.is_warning) ? $t('repo.pipeline.errors') : $t('repo.pipeline.warnings')"
:count="pipeline.errors?.length"
:icon-class="pipeline.errors.some((e) => !e.is_warning) ? 'text-wp-error-100' : 'text-wp-state-warn-100'"
Expand Down
7 changes: 6 additions & 1 deletion web/src/views/repo/settings/Crons.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@
</span>
<span v-else class="col-span-2 <md:hidden">{{ $t('repo.settings.crons.not_executed_yet') }}</span>
</span>
<IconButton icon="play" class="ml-auto w-8 h-8" :title="$t('repo.settings.crons.run')" @click="runCron(cron)" />
<IconButton
icon="play-outline"
class="ml-auto w-8 h-8"
:title="$t('repo.settings.crons.run')"
@click="runCron(cron)"
/>
<IconButton icon="edit" class="w-8 h-8" :title="$t('repo.settings.crons.edit')" @click="selectedCron = cron" />
<IconButton
icon="trash"
Expand Down