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

ショートカットキー割り当てダイアログのリデザイン #2348

Merged
merged 26 commits into from
Dec 7, 2024
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
958c212
BaseIconButtonコンポーネントを追加
takusea Nov 8, 2024
47e5db4
デザインを新しいものに変更
takusea Nov 8, 2024
2033db3
未設定にするボタンを削除
takusea Nov 8, 2024
dd0e3c9
文言の揺れを統一
takusea Nov 8, 2024
cb71428
リファクタリング
takusea Nov 8, 2024
be7f11f
readonly時にdisabledになるように修正
takusea Nov 9, 2024
671a9b8
BaseIconButtonのStoryファイルを追加
takusea Nov 9, 2024
a10129a
アニメーションを削除
takusea Nov 19, 2024
cfa2dd5
真偽値が間違っていたのを修正
takusea Nov 19, 2024
9cd40bc
Revert "未設定にするボタンを削除"
takusea Nov 25, 2024
5fd40d9
ラベルの表記を修正
takusea Nov 25, 2024
6512b4e
テーブル寄りのデザインに変更
takusea Nov 25, 2024
d0d2bcd
disabledのStoryを追加
takusea Dec 2, 2024
442605e
スクロールバーのz-indexを変数に括りだし
takusea Dec 3, 2024
9b50216
未使用の記述を削除
takusea Dec 3, 2024
12d0113
テーブル行の高さを縮める
takusea Dec 3, 2024
25252de
Merge branch 'main' into redesign-hotkey-dialog
takusea Dec 3, 2024
66c7ed0
SCSSの色調整をcolor.adjustを用いた記述に変更
takusea Dec 3, 2024
fe9aad8
[update snapshots]
takusea Dec 3, 2024
08df2b9
BaseIconButtonのスナップショットを追加
takusea Dec 3, 2024
740fe18
検索をケースインセンシティブに変更
takusea Dec 7, 2024
825bd0e
disabled時のopacityを0.4に変更
takusea Dec 7, 2024
57351c5
Merge branch 'main' into redesign-hotkey-dialog
Hiroshiba Dec 7, 2024
24ce87e
スナップショットアップデートのために一度削除 [update snapshots]
Hiroshiba Dec 7, 2024
c48fe61
(スナップショットを更新)
github-actions[bot] Dec 7, 2024
6a2a7cb
テスト用空commit
Hiroshiba Dec 7, 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 src/components/Base/BaseButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ defineEmits<{

.button {
display: flex;
justify-content: space-between;
justify-content: center;
align-items: center;
text-wrap: nowrap;
height: vars.$size-control;
Expand Down
36 changes: 36 additions & 0 deletions src/components/Base/BaseIconButton.stories.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import type { Meta, StoryObj } from "@storybook/vue3";

import { TooltipProvider } from "radix-vue";
import BaseIconButton from "./BaseIconButton.vue";

const meta: Meta<typeof BaseIconButton> = {
component: BaseIconButton,
render: (args) => ({
components: { BaseIconButton, TooltipProvider },
setup() {
return { args };
},
template: `
<TooltipProvider>
<BaseIconButton v-bind="args" />
</TooltipProvider>`,
}),
};

export default meta;
type Story = StoryObj<typeof BaseIconButton>;

export const Default: Story = {
args: {
label: "Default",
icon: "settings",
},
};

export const Disabled: Story = {
args: {
label: "Disabled",
icon: "settings",
disabled: true,
},
};
62 changes: 62 additions & 0 deletions src/components/Base/BaseIconButton.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<template>
<BaseTooltip :label>
<button
class="button"
:disabled
@click="(payload) => $emit('click', payload)"
>
<!-- 暫定でq-iconを使用 -->
<QIcon v-if="icon" :name="icon" size="sm" />
</button>
</BaseTooltip>
</template>

<script setup lang="ts">
import BaseTooltip from "./BaseTooltip.vue";

defineProps<{
icon: string;
label: string;
disabled?: boolean;
Copy link
Member

Choose a reason for hiding this comment

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

Storybookでdisable状態の作っても良いかもですね!

}>();

defineEmits<{
(e: "click", payload: MouseEvent): void;
}>();
</script>

<style scoped lang="scss">
@use "@/styles/v2/variables" as vars;
@use "@/styles/v2/mixin" as mixin;
@use "@/styles/v2/colors" as colors;

.button {
border: none;
display: flex;
justify-content: center;
align-items: center;
height: vars.$size-control;
width: vars.$size-control;
border-radius: vars.$radius-1;
color: colors.$display;
background-color: colors.$clear;
cursor: pointer;

&:focus-visible {
@include mixin.on-focus;
}

&:hover:not(:disabled) {
background-color: colors.$clear-hovered;
}

&:active:not(:disabled) {
background-color: colors.$clear-pressed;
}

&:disabled {
// Quasar側のopacity: 0.6 !important;を上書きするためimportantを付与
opacity: 0.4 !important;
}
}
</style>
1 change: 1 addition & 0 deletions src/components/Base/BaseScrollArea.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ import {
.ScrollAreaScrollbar {
user-select: none;
touch-action: none;
z-index: vars.$z-index-scrollbar;
}

.ScrollAreaScrollbar[data-orientation="vertical"] {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Dialog/HotkeyRecordingDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
/>
<QBtn
padding="xs md"
label="ショートカットキーを未設定にする"
label="ショートカットキーを未割り当てにする"
unelevated
color="surface"
textColor="display"
Expand Down
Loading
Loading