Skip to content

Commit

Permalink
[project-redesign-help-dialog]mainリポジトリへのマージに向けた最終調整 (#2160)
Browse files Browse the repository at this point in the history
* 拡張子を.spec.tsに変更

* summary要素のスタイルを追加

* display,display-on-colorにlightenを追加

* SCSS変数を用いるように変更

* HelpDialogコンポーネントのパスを修正

* 新デザインで用いるscssファイルのパスをstyles/v2下に変更

* 不要なuseを削除
  • Loading branch information
takusea authored Jul 24, 2024
1 parent 82e1507 commit 2b1aec7
Show file tree
Hide file tree
Showing 17 changed files with 73 additions and 65 deletions.
6 changes: 3 additions & 3 deletions src/components/Base/BaseButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ defineEmits<{
</script>

<style scoped lang="scss">
@use "@/styles/variables" as vars;
@use "@/styles/mixin" as mixin;
@use "@/styles/colors-v2" as colors;
@use "@/styles/v2/variables" as vars;
@use "@/styles/v2/mixin" as mixin;
@use "@/styles/v2/colors" as colors;
.button {
display: flex;
Expand Down
6 changes: 3 additions & 3 deletions src/components/Base/BaseDocumentView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
</template>

<style scoped lang="scss">
@use "@/styles/variables" as vars;
@use "@/styles/mixin" as mixin;
@use "@/styles/colors-v2" as colors;
@use "@/styles/v2/variables" as vars;
@use "@/styles/v2/mixin" as mixin;
@use "@/styles/v2/colors" as colors;
.document {
:deep(*) {
Expand Down
6 changes: 3 additions & 3 deletions src/components/Base/BaseListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ defineEmits<{
</script>

<style scoped lang="scss">
@use "@/styles/variables" as vars;
@use "@/styles/mixin" as mixin;
@use "@/styles/colors-v2" as colors;
@use "@/styles/v2/variables" as vars;
@use "@/styles/v2/mixin" as mixin;
@use "@/styles/v2/colors" as colors;
.listitem {
color: colors.$display;
Expand Down
6 changes: 3 additions & 3 deletions src/components/Base/BaseRowCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ defineEmits<{
</script>

<style scoped lang="scss">
@use "@/styles/variables" as vars;
@use "@/styles/mixin" as mixin;
@use "@/styles/colors-v2" as colors;
@use "@/styles/v2/variables" as vars;
@use "@/styles/v2/mixin" as mixin;
@use "@/styles/v2/colors" as colors;
.row-card {
display: flex;
Expand Down
4 changes: 2 additions & 2 deletions src/components/Base/BaseScrollArea.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import {
</script>

<style scoped lang="scss">
@use "@/styles/variables" as vars;
@use "@/styles/colors-v2" as colors;
@use "@/styles/v2/variables" as vars;
@use "@/styles/v2/colors" as colors;
.ScrollAreaRoot {
width: 100%;
Expand Down
8 changes: 4 additions & 4 deletions src/components/Dialog/HelpDialog/HelpDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,8 @@ const openLogDirectory = window.backend.openLogDirectory;
</script>

<style scoped lang="scss">
@use "@/styles/colors-v2" as colors;
@use "@/styles/variables" as vars;
@use "@/styles/v2/colors" as colors;
@use "@/styles/v2/variables" as vars;
.grid {
display: grid;
Expand All @@ -308,8 +308,8 @@ const openLogDirectory = window.backend.openLogDirectory;
}
.list-label {
padding: 8px 16px;
padding-top: 16px;
padding: vars.$padding-2;
padding-bottom: vars.$padding-1;
color: colors.$display-sub;
}
Expand Down
6 changes: 3 additions & 3 deletions src/components/Dialog/HelpDialog/HelpLibraryPolicySection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ const selectCharacterInfo = (index: DetailKey | undefined) => {
</script>

<style scoped lang="scss">
@use "@/styles/variables" as vars;
@use "@/styles/mixin" as mixin;
@use "@/styles/colors-v2" as colors;
@use "@/styles/v2/variables" as vars;
@use "@/styles/v2/mixin" as mixin;
@use "@/styles/v2/colors" as colors;
.container {
// TODO: 親コンポーネントからheightを取得できないため一時的にcalcを使用、HelpDialogの構造を再設計後100%に変更する
Expand Down
4 changes: 2 additions & 2 deletions src/components/Dialog/HelpDialog/HelpMarkdownViewSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ onMounted(async () => {
</script>

<style scoped lang="scss">
@use "@/styles/variables" as vars;
@use "@/styles/colors-v2" as colors;
@use "@/styles/v2/variables" as vars;
@use "@/styles/v2/colors" as colors;
.container {
// TODO: 親コンポーネントからheightを取得できないため一時的にcalcを使用、HelpDialogの構造を再設計後100%に変更する
Expand Down
6 changes: 3 additions & 3 deletions src/components/Dialog/HelpDialog/HelpOssLicenseSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ const selectLicenseIndex = (index: number | undefined) => {
</script>

<style scoped lang="scss">
@use "@/styles/variables" as vars;
@use "@/styles/mixin" as mixin;
@use "@/styles/colors-v2" as colors;
@use "@/styles/v2/variables" as vars;
@use "@/styles/v2/mixin" as mixin;
@use "@/styles/v2/colors" as colors;
.container {
// TODO: 親コンポーネントからheightを取得できないため一時的にcalcを使用、HelpDialogの構造を再設計後100%に変更する
Expand Down
18 changes: 8 additions & 10 deletions src/components/Dialog/HelpDialog/HelpUpdateInfoSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ const props = defineProps<{
</script>

<style scoped lang="scss">
@use "@/styles/variables" as vars;
@use "@/styles/mixin" as mixin;
@use "@/styles/colors-v2" as colors;
@use "@/styles/v2/variables" as vars;
@use "@/styles/v2/mixin" as mixin;
@use "@/styles/v2/colors" as colors;
.container {
// TODO: 親コンポーネントからheightを取得できないため一時的にcalcを使用、HelpDialogの構造を再設計後100%に変更する
Expand All @@ -75,15 +75,13 @@ const props = defineProps<{
}
.info {
background-color: #e9f3e7;
padding: 16px;
border-radius: 16px;
border: 1px solid colors.$border;
background-color: colors.$surface;
padding: vars.$padding-2;
border-radius: vars.$radius-2;
}
.info-title {
font-size: 1.25rem;
font-weight: bold;
line-height: 2;
margin: 0;
@include mixin.headline-2;
}
</style>
10 changes: 10 additions & 0 deletions src/components/Dialog/ImportSongProjectDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -301,3 +301,13 @@ const handleCancel = () => {
onDialogCancel();
};
</script>

<style scoped lang="scss">
// detailsタグのスタイル
details {
summary {
display: list-item;
cursor: pointer;
}
}
</style>
3 changes: 2 additions & 1 deletion src/styles/_index.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@use './variables' as vars;
@use './colors' as colors;
@use './colors-v2' as colors-v2;
@use './v2/variables' as vars-v2;
@use './v2/colors' as colors-v2;
@import "./fonts";

// 優先度を強引に上げる
Expand Down
4 changes: 2 additions & 2 deletions src/styles/colors-v2.scss → src/styles/v2/colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ $primitive-red: #d04756;
--color-v2-border: #{rgba($primitive-black, 0.2)};
--color-v2-selected: #{rgba($primitive-primary, 0.3)};

--color-v2-display: #{$primitive-black, 10%};
--color-v2-display-oncolor: #{$primitive-black, 10%};
--color-v2-display: #{lighten($primitive-black, 10%)};
--color-v2-display-oncolor: #{lighten($primitive-black, 10%)};
--color-v2-display-sub: #{rgba($primitive-black, 0.5)};
--color-v2-display-link: #{$primitive-blue};
--color-v2-display-warning: #{$primitive-red};
Expand Down
File renamed without changes.
24 changes: 24 additions & 0 deletions src/styles/v2/variables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
:root {
--size-basis: 8px;
--padding-basis: 8px;
--gap-basis: 8px;
--radius-basis: 8px;
}

$size-scrollbar: calc(var(--size-basis) * 1.5);
$size-icon: calc(var(--size-basis) * 2);
$size-indicator: calc(var(--size-basis) * 3);
$size-control: calc(var(--size-basis) * 4);
$size-listitem: calc(var(--size-basis) * 5);
$size-fab: calc(var(--size-basis) * 6);

$padding-1: var(--padding-basis);
$padding-2: calc(var(--padding-basis) * 2);

$gap-1: var(--gap-basis);
$gap-2: calc(var(--gap-basis) * 2);

$radius-1: var(--radius-basis);
$radius-2: calc(var(--radius-basis) * 2);

$transition-duration: 100ms;
25 changes: 0 additions & 25 deletions src/styles/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,3 @@ $menubar-height: 24px;
$detail-view-splitter-cell-z-index: 2;

$character-item-size: 215px; // キャラクター並び替えダイアログなどでの1キャラ表示要素の横幅

:root {
--size-basis: 8px;
--padding-basis: 8px;
--gap-basis: 8px;
--radius-basis: 8px;
}

$size-scrollbar: calc(var(--size-basis) * 1.5);
$size-icon: calc(var(--size-basis) * 2);
$size-indicator: calc(var(--size-basis) * 3);
$size-control: calc(var(--size-basis) * 4);
$size-listitem: calc(var(--size-basis) * 5);
$size-fab: calc(var(--size-basis) * 6);

$padding-1: var(--padding-basis);
$padding-2: calc(var(--padding-basis) * 2);

$gap-1: var(--gap-basis);
$gap-2: calc(var(--gap-basis) * 2);

$radius-1: var(--radius-basis);
$radius-2: calc(var(--radius-basis) * 2);

$transition-duration: 100ms;
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { mount, flushPromises } from "@vue/test-utils";
import { describe, it } from "vitest";
import HelpMarkdownViewSection from "@/components/template/HelpMarkdownViewSection.vue";
import HelpMarkdownViewSection from "@/components/Dialog/HelpDialog/HelpMarkdownViewSection.vue";
import { markdownItPlugin } from "@/plugins/markdownItPlugin";

describe("HelpMarkdownViewSection.vue", () => {
Expand Down

0 comments on commit 2b1aec7

Please sign in to comment.