2

I have two main routes /projects (where the user sees a list of its own projects and can create and delete multiple projects) and /project/:id (where the user can manage its current project).

A user always has a current project. When a user logs in, the app loads its current project (or latest project in use) from the database and store it in the application state.

Let’s say a user has 3 projects A, B and C. Their current project is B. On /projects The user creates a new project D and on submit:

  1. project D is created
  2. project D becomes the current project
  3. the user is redirected to /project/D

Now let’s say a user’s current project is B and they delete it.

  1. How should I reassign a current project to the user? Is there a best practice for this? Should it be randomly reassigned?
  2. where the user should he redirected since the current project doesn't exist anymore?

It’s like deleting the workspace you’re operating on. You can’t be on that workspace anymore but you can’t operate in a vacuum.

2
  • Why does a user have to have current project? If I edit documents in google docs, there is also an emtpy state without any documents.
    – Nash
    Commented Aug 1, 2021 at 22:21
  • @Nash think of a scenario where you have multiple google accounts with google drives for each, the project in the scenario described here is referring to each drive. Commented Aug 2, 2021 at 4:21

3 Answers 3

1

For the use case described by you - a user's current project is B and it is deleted:

An empty state can come up which says 'The project B has been deleted or does not exist.' and based on the two scenarios, the content after this line can be different for these different use cases:

  • User is in other projects A and B: Use the project navigator to go to other projects you are a part of OR You are being redirected to another project > loader > User directed to the project with their most recent activity.
  • User is in no other project than B: 'Contact your admin to be added to a project'

How does a user navigate between the 3 projects A, B, C that they are a part of? If it is something like JIRA, then it will be very easy for a user to keep track of where they are in the platform and where they can go.

enter image description here

image credits: https://support.atlassian.com/jira-work-management/docs/access-a-project/

1
  • thank you for your answer. A user can be in only one project at a time and must be at least in one project. Because unlike Google sheet where you can have an empty state and one route can forces you to choose a Sheet to access the rest of the app functionalities, in my app there are two way to access a project. From the header’s select dropdown and from a side bar menu. What if I access /projects/* from the sidebar without a current project selected? What should happen to the select dropdown if the current project is deleted? That dropdown should show in which environment I am working on.
    – Sawatdi
    Commented Aug 2, 2021 at 6:50
0

I guess a "drafts" workspace that will always be owned by the user will fix your vacuum problem. Whenever an admin or the user himself (If there has to be a role to delete a workspace) deletes the workspace, he'll be redirected to his drafts workspace.

0

I do not understand what you mean by "routes", but you say there is a place "(where the user sees a list of its own projects and can create and delete multiple projects)". I think this is the place the user should be put in after deleting their current project, to select an existing or create a new one.

Your description sounds a little like you have taken two conflicting decisions:

  • There is no standalone screen (or dialog) which represents the above-mentioned place "(where the user sees a list of its own projects and can create and delete multiple projects)".
  • There is no empty main content, and therefore "A user always has a current project."

If the project selection is only a sidebar (and no standalone screen), you need a design for an empty main content.

If, on the other hand, you don't want an empty main content, you need a screen or dialog to force the user to select an existing project or create a new one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.