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

Update Upload Icon Design in UploadButton Component #839

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
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
11 changes: 8 additions & 3 deletions frontend/src/components/Panel/UploadButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,36 @@
<v-btn
v-bind="props"
@click="select"
icon="mdi-upload"
:loading="loading"
:color="btnColor"
:variant="variant"
:width="width"
:class="btnClass"
/>
>
<svg-icon type="mdi" :path="path"></svg-icon>
</v-btn>
</template>
</v-tooltip>
<v-btn
v-else
v-bind="props"
@click="select"
prepend-icon="mdi-upload"
:loading="loading"
:color="btnColor"
:variant="variant"
:width="width"
:class="btnClass"
>
<svg-icon type="mdi" :path="path"></svg-icon>
{{ label }}
</v-btn>
</template>

<script setup lang="ts">
import { type PropType } from 'vue'
import { ref } from 'vue'
import SvgIcon from '@jamescoyle/vue-icon'
import { mdiFileDownload } from '@mdi/js'
Copy link
Member

Choose a reason for hiding this comment

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

it looks not intuitive to me to use a download icon for an upload functionality

const props = defineProps({
accept: { type: String, default: '.yaml,.yml,text/yaml,application/x-yaml' },
Expand All @@ -48,6 +51,8 @@ const props = defineProps({
btnClass: { type: String }
})
const path = mdiFileDownload
Copy link
Member

Choose a reason for hiding this comment

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

is not needed you can use the import directly in the template

Copy link
Author

Choose a reason for hiding this comment

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

Thank you @fjogeleit for reviewing!

I initially thought it would make more sense by using "download arrow icon" for showing import along with a file icon, thinking it would visually represent "importing" a file (downloading into the playground).

Copy link
Member

Choose a reason for hiding this comment

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

A download icon could also indicate the download of the current content. I am fine using the mdi-file-upload icon.

const input = ref<HTMLInputElement | null>(null)
const emit = defineEmits(['click'])
Expand Down
Loading