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

revert: re-enable workspaces #278

Open
wants to merge 5 commits into
base: main
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: 1 addition & 1 deletion .github/workflows/ui-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
check-latest: true

- name: Add to Hosts
Expand Down
2 changes: 1 addition & 1 deletion frappe-ui
Submodule frappe-ui updated 221 files
4 changes: 2 additions & 2 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@vueuse/core": "^10.1.2",
"dayjs": "^1.10.7",
"feather-icons": "^4.28.0",
"frappe-ui": "^0.1.57",
"frappe-ui": "^0.1.64",
"fuzzysort": "^2.0.4",
"gemoji": "^7.1.0",
"htmldiff-js": "^1.0.5",
Expand All @@ -37,4 +37,4 @@
"vite": "^4.4.9",
"vue-template-compiler": "^2.7.14"
}
}
}
2 changes: 1 addition & 1 deletion frontend/src/components/Comment.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
label: 'Delete',
variant: 'solid',
theme: 'red',
onClick: ({ close }) => {
onClick: (close) => {
return comments.setValue
.submit({
name: comment.name,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/CommentsArea.vue
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ export default {
actions: [
{
label: 'Discard comment',
onClick: ({ close }) => {
onClick: (close) => {
this.resetCommentState()
close()
},
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/CommentsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ export default {
actions: [
{
label: 'Discard comment',
onClick: ({ close }) => {
onClick: (close) => {
this.resetCommentState()
close()
},
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/components/DiscussionView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ export default {
actions: [
{
label: 'Pin',
onClick: ({ close }) =>
onClick: (close) =>
this.$resources.discussion.pinDiscussion
.submit()
.then(close),
Expand All @@ -400,7 +400,7 @@ export default {
actions: [
{
label: 'Unpin',
onClick: ({ close }) =>
onClick: (close) =>
this.$resources.discussion.unpinDiscussion
.submit()
.then(close),
Expand All @@ -423,7 +423,7 @@ export default {
actions: [
{
label: 'Close',
onClick: ({ close }) =>
onClick: (close) =>
this.$resources.discussion.closeDiscussion
.submit()
.then(close),
Expand All @@ -446,7 +446,7 @@ export default {
actions: [
{
label: 'Re-open',
onClick: ({ close }) =>
onClick: (close) =>
this.$resources.discussion.reopenDiscussion
.submit()
.then(close),
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/InviteGuestDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ function remove(user) {
label: 'Delete',
variant: 'solid',
theme: 'red',
onClick: ({ close }) => {
onClick: (close) => {
return pending.delete.submit(user.name).then(close)
},
},
Expand All @@ -126,7 +126,7 @@ function remove(user) {
label: 'Delete',
variant: 'solid',
theme: 'red',
onClick: ({ close }) => {
onClick: (close) => {
return props.project.removeGuest.submit(
{ email: user.user },
{
Expand Down
5 changes: 2 additions & 3 deletions frontend/src/components/NewTaskDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
<Autocomplete
placeholder="Assign a user"
:options="assignableUsers"
:value="newTask.assigned_to"
@change="(option) => (newTask.assigned_to = option?.value || '')"
v-model="newTask.assigned_to"
@update:modelValue="(option) => (newTask.assigned_to = option?.value || '')"
/>
</div>
<ErrorMessage class="mt-2" :message="createTask.error" />
Expand Down Expand Up @@ -104,7 +104,6 @@ function statusOptions({ onClick }) {

const assignableUsers = computed(() => {
return activeUsers.value
.filter((user) => user.name != newTask.value.assigned_to)
.map((user) => ({
label: user.full_name,
value: user.name,
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/components/Poll.vue
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export default {
{
label: `Vote for "${option.title}"`,
variant: 'solid',
onClick: ({ close }) => {
onClick: (close) => {
this.$resources.poll.submitVote
.submit({ option: option.title })
.then(close)
Expand Down Expand Up @@ -220,7 +220,7 @@ export default {
label: 'Stop',
variant: 'solid',
theme: 'red',
onClick: ({ close }) =>
onClick: (close) =>
this.$resources.poll.stopPoll.submit().then(close),
},
],
Expand Down Expand Up @@ -281,7 +281,7 @@ export default {
label: 'Retract vote',
variant: 'solid',
theme: 'red',
onClick: ({ close }) =>
onClick: (close) =>
this.$resources.poll.retractVote.submit().then(close),
},
],
Expand All @@ -306,7 +306,7 @@ export default {
label: 'Delete',
variant: 'solid',
theme: 'red',
onClick: ({ close }) =>
onClick: (close) =>
this.$resources.poll.delete.submit().then(close),
},
],
Expand Down
6 changes: 5 additions & 1 deletion frontend/src/components/ReadmeEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
v-if="collapsible && readmeHeight > 150"
>
<Tooltip text="Expand/Collapse">
<Button variant="ghost" @click="expand = !expand">
<Button variant="ghost" @click.stop="expandCollapse">
<template #icon>
<LucideUnfoldVertical class="w-4" />
</template>
Expand Down Expand Up @@ -123,6 +123,10 @@ export default {
this.$refs.readme.editor.commands.focus()
})
},
expandCollapse(e) {
e.stopImmediatePropagation()
this.expand = !this.expand
},
},
}
</script>
4 changes: 2 additions & 2 deletions frontend/src/components/Settings/Members.vue
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export default {
{
label: 'Change Role',
variant: 'solid',
onClick: ({ close }) => {
onClick: (close) => {
return this.$resources.changeUserRole.submit(
{ user: user.name, role },
{ onSuccess: close }
Expand All @@ -132,7 +132,7 @@ export default {
label: 'Remove User',
variant: 'solid',
theme: 'red',
onClick: ({ close }) => {
onClick: (close) => {
return this.$resources.removeUser.submit(
{ user: user.name },
{ onSuccess: close }
Expand Down
30 changes: 12 additions & 18 deletions frontend/src/components/TaskDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
label: 'Delete',
theme: 'red',
variant: 'solid',
onClick({ close }) {
onClick(close) {
return $resources.task.delete.submit(null, {
onSuccess() {
close()
Expand Down Expand Up @@ -79,14 +79,8 @@
<Autocomplete
placeholder="Assign a user"
:options="assignableUsers"
:value="$resources.task.doc.assigned_to"
@change="
(option) => {
$resources.task.setValue.submit({
assigned_to: option?.value || '',
})
}
"
v-model="$resources.task.doc.assigned_to"
@update:modelValue="changeAssignee"
/>
<TextInput
type="date"
Expand Down Expand Up @@ -133,14 +127,8 @@
<Autocomplete
placeholder="Assign a user"
:options="assignableUsers"
:value="$resources.task.doc.assigned_to"
@change="
(option) => {
$resources.task.setValue.submit({
assigned_to: option?.value || '',
})
}
"
v-model="$resources.task.doc.assigned_to"
@update:modelValue="changeAssignee"
/>
</div>
<div>Due Date</div>
Expand Down Expand Up @@ -218,6 +206,10 @@ export default {
whitelistedMethods: {
trackVisit: 'track_visit',
},
transform: (doc) => {
doc.project = doc.project.toString();
return doc
},
setValue: {
onError(e) {
let message = e.messages ? e.messages.join('\n') : e.message
Expand All @@ -241,6 +233,9 @@ export default {
},
},
methods: {
changeAssignee(option) {
this.$resources.task.setValue.submit({ assigned_to: option?.value || '' });
},
changeProject(option) {
this.$resources.task.setValue.submit(
{
Expand Down Expand Up @@ -270,7 +265,6 @@ export default {
computed: {
assignableUsers() {
return activeUsers.value
.filter((user) => user.name != this.$resources.task.doc.assigned_to)
.map((user) => ({
label: user.full_name,
value: user.name,
Expand Down
5 changes: 2 additions & 3 deletions frontend/src/pages/PageGrid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@
actions: [
{
label: 'Delete',
onClick: ({ close }) => {
close()
return $resources.pages.delete.submit(d.name)
onClick: (close) => {
return $resources.pages.delete.submit(d.name).then(close)
},
variant: 'solid',
theme: 'red',
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/pages/Project.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
{
label: 'Save',
variant: 'solid',
onClick({ close }) {
onClick(close) {
return project.setValue
.submit({
title: project.doc.title,
Expand Down Expand Up @@ -429,7 +429,7 @@ export default {
{
label: 'Archive',
variant: 'solid',
onClick: ({ close }) => {
onClick: (close) => {
return this.project.archive.submit(null, {
onSuccess: close,
})
Expand All @@ -446,7 +446,7 @@ export default {
{
label: 'Unarchive',
variant: 'solid',
onClick: ({ close }) => {
onClick: (close) => {
return this.project.unarchive.submit(null, {
onSuccess: close,
})
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/ProjectDiscussionNew.vue
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export default {
actions: [
{
label: 'Discard post',
onClick: ({ close }) => {
onClick: (close) => {
localStorage.removeItem(this.draftPostKey())
this.$router.push({ name: 'ProjectDiscussions' })
close()
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/Team.vue
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export default {
{
label: 'Archive',
variant: 'solid',
onClick: ({ close }) => {
onClick: (close) => {
return this.team.archive.submit(null, {
onSuccess: () => {
this.$router.replace({ name: 'Home' })
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
{
"private": true,
"aworkspaces": ["frontend", "frappe-ui"],
"workspaces": [
"frontend",
"frappe-ui"
],
"scripts": {
"postinstall": "cd frontend && yarn install",
"dev": "cd frontend && yarn dev",
"build": "cd frontend && yarn build"
}
}
}
Loading
Loading