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

Minor drag style adjustment for activities #19299

Merged
Merged
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
25 changes: 11 additions & 14 deletions client/src/components/ActivityBar/ActivityBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ const dragItem: Ref<Activity | null> = ref(null);
// drag state
const isDragging = ref(false);

// computed values
const canDrag = computed(() => isActiveSideBar("settings"));
const isSideBarOpen = computed(() => activityStore.toggledSideBar !== "");

/**
* Checks if the route of an activity is currently being visited and panels are collapsed
*/
Expand All @@ -112,8 +116,6 @@ function isActiveSideBar(menuKey: string) {
return activityStore.toggledSideBar === menuKey;
}

const isSideBarOpen = computed(() => activityStore.toggledSideBar !== "");

/**
* Checks if an activity that has a panel should have the `is-active` prop
*/
Expand Down Expand Up @@ -189,10 +191,6 @@ function setActiveSideBar(key: string) {
activityStore.toggledSideBar = key;
}

const canDrag = computed(() => {
return isActiveSideBar("settings");
});

defineExpose({
isActiveSideBar,
setActiveSideBar,
Expand Down Expand Up @@ -224,7 +222,7 @@ defineExpose({
<div
v-for="(activity, activityIndex) in activities"
:key="activityIndex"
:class="{ 'can-drag': canDrag }">
:class="{ 'activity-can-drag': canDrag }">
<div v-if="activity.visible && (activity.anonymous || !isAnonymous)">
<UploadItem
v-if="activity.id === 'upload'"
Expand Down Expand Up @@ -354,6 +352,12 @@ defineExpose({
display: none;
}

.activity-can-drag .activity-item {
border-radius: $border-radius-extralarge;
outline: 2px dashed $border-color;
outline-offset: -3px;
}

.activity-chosen-class {
background: $brand-secondary;
border-radius: $border-radius-extralarge;
Expand Down Expand Up @@ -388,11 +392,4 @@ defineExpose({
overflow-y: auto;
overflow-x: hidden;
}

.can-drag {
border-radius: 12px;
border: 1px;
outline: dashed darkgray;
outline-offset: -3px;
}
</style>
Loading