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

[24.2] Display upload help highlight only once and include Rule-based upload info #19393

Open
wants to merge 1 commit into
base: release_24.2
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions client/src/components/Help/terms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,5 @@ galaxy:
A utility for uploading files to a Galaxy server from the command line. Use ``galaxy-upload`` to upload
file(s) to a Galaxy server, and ``galaxy-history-search``, a helper utility to find Galaxy histories
to pass to the ``galaxy-upload`` command.
ruleBased: |
Galaxy can bulk import lists & tables of URLs into datasets or collections using reproducible rules.
46 changes: 37 additions & 9 deletions client/src/components/Upload/UploadModal.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup>
import { BModal } from "bootstrap-vue";
import { BCarousel, BCarouselSlide, BModal } from "bootstrap-vue";
import { storeToRefs } from "pinia";
import { ref, watch } from "vue";

Expand All @@ -13,7 +13,7 @@ import ExternalLink from "../ExternalLink.vue";
import HelpText from "../Help/HelpText.vue";
import UploadContainer from "./UploadContainer.vue";

const { currentUser } = storeToRefs(useUserStore());
const { currentUser, hasSeenUploadHelp } = storeToRefs(useUserStore());
const { currentHistoryId, currentHistory } = useUserHistories(currentUser);

const { config, isConfigLoaded } = useConfig();
Expand Down Expand Up @@ -65,7 +65,14 @@ async function open(overrideOptions) {

watch(
() => showModal.value,
(modalShown) => setIframeEvents(["galaxy_main"], modalShown)
(modalShown) => {
setIframeEvents(["galaxy_main"], modalShown);

// once the modal closes the first time a user sees help, we never show it again
if (!modalShown && !hasSeenUploadHelp.value) {
hasSeenUploadHelp.value = true;
}
}
);

defineExpose({
Expand All @@ -91,12 +98,33 @@ defineExpose({
to <b>{{ currentHistory.name }}</b>
</span>
</h2>
<span>
<ExternalLink href="https://galaxy-upload.readthedocs.io/en/latest/"> Click here </ExternalLink>
to check out the
<HelpText uri="galaxy.upload.galaxyUploadUtil" text="galaxy-upload" />
util!
</span>

<BCarousel v-if="!hasSeenUploadHelp" :interval="4000" no-touch>
<BCarouselSlide>
<template v-slot:img>
<span class="text-nowrap float-right">
<ExternalLink href="https://galaxy-upload.readthedocs.io/en/latest/">
Click here
</ExternalLink>
to check out the
<HelpText uri="galaxy.upload.galaxyUploadUtil" text="galaxy-upload" />
util!
</span>
</template>
</BCarouselSlide>
<BCarouselSlide>
<template v-slot:img>
<span class="text-nowrap float-right">
More info on <HelpText uri="galaxy.upload.ruleBased" text="Rule-based" /> uploads
<ExternalLink
href="https://training.galaxyproject.org/training-material/topics/galaxy-interface/tutorials/upload-rules/tutorial.html">
here
</ExternalLink>
.
</span>
</template>
</BCarouselSlide>
</BCarousel>
</div>
</template>
<UploadContainer
Expand Down
2 changes: 2 additions & 0 deletions client/src/stores/userStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const useUserStore = defineStore("userStore", () => {
const currentPreferences = ref<Preferences | null>(null);

const preferredListViewMode = useUserLocalStorage("user-store-preferred-list-view-mode", "grid", currentUser);
const hasSeenUploadHelp = useUserLocalStorage("user-store-seen-upload-help", false, currentUser);

let loadPromise: Promise<void> | null = null;

Expand Down Expand Up @@ -148,6 +149,7 @@ export const useUserStore = defineStore("userStore", () => {
currentTheme,
currentFavorites,
preferredListViewMode,
hasSeenUploadHelp,
loadUser,
matchesCurrentUsername,
setCurrentUser,
Expand Down
Loading