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

feat(tasks): bootstrap tasks plugin #5704

Merged
merged 64 commits into from
Mar 8, 2024
Merged

feat(tasks): bootstrap tasks plugin #5704

merged 64 commits into from
Mar 8, 2024

Conversation

pedrobonamin
Copy link
Contributor

@pedrobonamin pedrobonamin commented Feb 9, 2024

Description

Necessary PRs

Introduces initial WIP Tasks plugin.

Tasks will allow users to create and assign actions to users or themselves, linking documents if desired.
This is an initial implementation, design is still in progress.

  • The intention of this PR is to bring the main plugin changes to main, helping the team move faster and not depend on a feature branch, pushing for more atomic changes, is not the final and stable implementation.

  • The components and functionality consumed in Tasks from Comments will be refactored once the FormBuilder changes are introduced.

Implemented changes:

  • Tasks plugin with studio sidebar.
  • Tasks basic CRUD functionality.
  • Tasks navigation and discoverability, local only. Will be moved to router in upcoming changes.
  • Ability to see the tasks that belongs to a document.

Not implemented yet, will be added later.

  • Translations.
  • Navigation from router.
  • Use of Form in tasks, to support live editing and presence.
  • Notifications and server changes involved.
  • Final designs.

What to review

  • New alias sanity/tasks added.
  • Overall functionality
  • Code location.
  • No changes introduced to the rest of plugins and to core.

Testing

Notes for release

Screenshot 2024-03-04 at 09 44 45 Screenshot 2024-03-04 at 09 44 29

@pedrobonamin pedrobonamin requested review from a team as code owners February 9, 2024 08:35
@pedrobonamin pedrobonamin requested review from ninaandal and cngonzalez and removed request for a team February 9, 2024 08:35
Copy link

vercel bot commented Feb 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
performance-studio ✅ Ready (Inspect) Visit Preview Mar 8, 2024 4:52pm
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 8, 2024 4:52pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Mar 8, 2024 4:52pm

@pedrobonamin pedrobonamin marked this pull request as draft February 9, 2024 08:35
@pedrobonamin pedrobonamin force-pushed the edx-986-plugin branch 2 times, most recently from f15d112 to 82075f1 Compare February 9, 2024 08:38
Copy link
Contributor

github-actions bot commented Feb 9, 2024

No changes to documentation

Copy link
Contributor

github-actions bot commented Feb 9, 2024

Component Testing Report Updated Mar 8, 2024 4:57 PM (UTC)

File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 30s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 5s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 12s 3 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 12s 4 2 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 12s 6 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 31s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 59s 15 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 59s 18 0 0
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 12s 6 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 13s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 19s 9 0 0

packages/sanity/package.json Outdated Show resolved Hide resolved
packages/sanity/tasks.js Outdated Show resolved Hide resolved
const {activeDocumentId} = useTasks()
const [isDisabledTab, setIsDisabledTab] = useState<boolean>(!activeDocumentId)

useEffect(() => {
Copy link
Member

Choose a reason for hiding this comment

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

Agree, we could probably refactor it to a observable, for example. I'll come up with a suggestion.

Signed-off-by: Fred Carlsen <fred@sjelfull.no>
@pedrobonamin pedrobonamin added this pull request to the merge queue Mar 8, 2024
Merged via the queue into next with commit dd0794a Mar 8, 2024
41 checks passed
@pedrobonamin pedrobonamin deleted the edx-986-plugin branch March 8, 2024 17:25
juice49 pushed a commit that referenced this pull request Mar 13, 2024
* feat(tasks): feature bootstrap, add initial setup

* fix(tasks): rename tasks provider actions, update tasks sidebar component

* fix(tasks): enable tasks in staging, remove from prod

* feat(core): add tasks data loading

Signed-off-by: Fred Carlsen <fred@sjelfull.no>

* refactor(tasks): move things around

Signed-off-by: Fred Carlsen <fred@sjelfull.no>

* feat(tasks): add support for showing document tasks

Signed-off-by: Fred Carlsen <fred@sjelfull.no>

* fix: add types and export internal tag to tasks exports

* chore(tasks): move files for plugin implementation

* chore(tasks): add tasks export path sanity/tasks

* feat(core): add studioNavbar rightSectionNode prop

* feat(tasks): import tasks as a plugin

* fix(tasks): setup workshop

* fix(tasks): rename component files to tasks

* fix(tasks): rename workshop folder

* fix(tasks): get createtask workshop story to show

* feat(tasks): add tasks create view

* fix(tasks): update TasksSetupProvider to return client instead of creating document

* feat(tasks): add tasks creation action

* feat(tasks): add tasks remove and edit

* feat(tasks): support document references

Signed-off-by: Fred Carlsen <fred@sjelfull.no>

* fixup! feat(tasks): support document references

Signed-off-by: Fred Carlsen <fred@sjelfull.no>

* fixup! feat(tasks): support document references

Signed-off-by: Fred Carlsen <fred@sjelfull.no>

* fix(tasks): set activeTab created when creating tasks

* fix(tasks): reset to created tab on delete

Signed-off-by: Fred Carlsen <fred@sjelfull.no>

* fix(tasks): disable sidebar animation

Signed-off-by: Fred Carlsen <fred@sjelfull.no>

* fix(tasks): small visual tweaks to task lists

Signed-off-by: Fred Carlsen <fred@sjelfull.no>

* feat(tasks): add document navigation from tasks

* fix(tasks): update breaking types definitions

* fix(tasks): add status to task

* fix(tasks); sort tasks based on status

* fix(tasks): run lint:fix

* fix(tasks): update navbarProp

* fix(tasks): add loadingstate to taskstatus

* feat(tasks): add assignee property to tasks

* Revert "chore(tasks): add tasks export path sanity/tasks"

This reverts commit eec41ca.

* chore(tasks): add tasks export path sanity/tasks

* fix(tasks): add exports definitions

* fix(tasks): small fixes

* feat(tasks): add feature flag check

* fix(tasks): fix type issue

Signed-off-by: Fred Carlsen <fred@sjelfull.no>

* fix(tasks): utilise document preview store for document titles

Signed-off-by: Fred Carlsen <fred@sjelfull.no>

* fix(tasks): center loading spinner

Signed-off-by: Fred Carlsen <fred@sjelfull.no>

* fix(tasks): revert type change

* fix(tasks): move styledIntentLink

* fix(tasks): show 'untitled' if title is undefined

* chore(tasks): create DescriptionInput

* feat(tasks): support adding related documents in tasks

* chore(tasks): add tasks codeowners

* fix(tasks): update to useUserListWithPermission

* chore(tasks): refactor file location, rename some, prepare PR

* chore(tasks): reuse addonDatasetProvider, remove tasksSetupProvider

* fix(tasks): add comment to tasksListTabs and rename state

* fix(tasks): remove update function from tasksOperation

* feat(tasks): update navigation styles, add header navigation

* fix(tasks): move tasks sidebar navigation to it's own context

* feat(tasks): add badge implementation of pending tasks

* Revert "chore(tasks): add tasks export path sanity/tasks"

This reverts commit 958a202.

* fix(tasks): type error

* chore(tasks): change created tab for subscribed tab in tasks navigation

* chore(tasks): small ui fixes

* fix(tasks): refactor tasksNavigation to a reducer, simplify state handling

* refactor(tasks): include tasks plugin via config flag (#5935)

Signed-off-by: Fred Carlsen <fred@sjelfull.no>

* fix(tasks): update pr with suggestions

* fix(tasks): fix build issue, import plugin into structure plugin, update enabled checks

---------

Signed-off-by: Fred Carlsen <fred@sjelfull.no>
Co-authored-by: Fred Carlsen <fred@sjelfull.no>
Co-authored-by: Nina Andal Aarvik <nina@sanity.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants