feature/projects-all-the-way-down #3323

Merged
konrad merged 123 commits from feature/projects-all-the-way-down into main 2023-05-30 10:09:40 +00:00
2 changed files with 6 additions and 6 deletions
Showing only changes of commit 2bb7ff1803 - Show all commits

View File

@ -8,13 +8,13 @@
handle=".handle"
tag="ul"
dpschen marked this conversation as resolved Outdated

Use <menu> (now I remembered the correct element).

Use [`<menu>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/menu) (now I remembered the correct element).

Done

Done
item-key="id"
:disabled="!allowDrag"
:disabled="!canEditOrder"
:component-data="{
type: 'transition-group',
name: !drag ? 'flip-list' : null,
class: [
'menu-list can-be-hidden',
{ 'dragging-disabled': !allowDrag }
{ 'dragging-disabled': !canEditOrder }
]
}"
>
@ -68,7 +68,7 @@
<ProjectsNavigation
dpschen marked this conversation as resolved Outdated

Nice!

Nice!
v-if="!collapsedProjects[p.id]"

Also don't render if there are no child projects.

Also don't render if there are no child projects.

But then it won't be possible to drag a project "under" a parent to make it a child of that parent.

But then it won't be possible to drag a project "under" a parent to make it a child of that parent.
v-model="p.childProjects"
:allow-drag="true"
:can-edit-order="true"
/>
</li>
</template>
@ -94,7 +94,7 @@ import {useProjectStore} from '@/stores/projects'
const props = defineProps<{
modelValue: IProject[],
allowDrag: boolean,
canEditOrder: boolean,
dpschen marked this conversation as resolved Outdated

Should have a default value.

When is allowDrag === true? In case this is related to edit rights we should align the variable names.

Should have a default value. When is `allowDrag === true`? In case this is related to edit rights we should align the variable names.

Just saw when it's true. Can we rename to the concrete action? Because the order might also be changed by something else than dragging in the future. How about canEditOrder?

Just saw when it's true. Can we rename to the concrete action? Because the order might also be changed by something else than dragging in the future. How about `canEditOrder`?

Can we rename to the concrete action? Because the order might also be changed by something else than dragging in the future. How about canEditOrder?

I think that's a good idea. Renamed it.

> Can we rename to the concrete action? Because the order might also be changed by something else than dragging in the future. How about canEditOrder? I think that's a good idea. Renamed it.
}>()

Danger! This should be handled in the store!
Inline editing of parent project!

Probably it would be best to create a new store method. Something like setOrder or changeOrder.

Danger! This should be handled in the store! Inline editing of parent project! Probably it would be best to create a new store method. Something like `setOrder` or `changeOrder`.

I was able to move the whole thing into the updateProject method of the store.

I was able to move the whole thing into the `updateProject` method of the store.
const emit = defineEmits(['update:modelValue'])

View File

@ -49,11 +49,11 @@
</nav>
<nav class="menu" v-if="favoriteProjects">
dpschen marked this conversation as resolved Outdated

Move v-if to front

Move `v-if` to front

Done

Done
<ProjectsNavigation v-model="favoriteProjects" :allow-drag="false"/>
<ProjectsNavigation v-model="favoriteProjects" :can-edit-order="false"/>
</nav>
<nav class="menu">
<ProjectsNavigation v-model="projects" :allow-drag="true"/>
<ProjectsNavigation v-model="projects" :can-edit-order="true"/>
</nav>
<PoweredByLink/>