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

Create task form #680

Merged
merged 14 commits into from
Oct 2, 2023
Merged

Create task form #680

merged 14 commits into from
Oct 2, 2023

Conversation

negreirosleo
Copy link
Contributor

@negreirosleo negreirosleo commented Sep 26, 2023

Changes

This PR creates the new Task form, it:

  • adds react-query to fetch and manage the data
  • creates the /task page
  • creates a useForm hook to manage the form state
  • creates the components: Input, Select, TextArea with floating label

In the Adobe Layout the form items have 40px of height, but I changed it to 56px to accommodate the floating label.

Screenshots

image

We will be using JoyUI theme for now so its safe to delete this
This lib is being installed to facilitate the communication with
the API and the state management for it.
@anarute
Copy link
Member

anarute commented Sep 27, 2023

I'm tyring to test it locally and I keep being redirected to /web/v2 when I try to access /web/v2/tasks
Is there something I need to do to test it properly?

@dmtrek14
Copy link
Collaborator

@anarute I also keep getting redirected, but I tried commenting out the signinRedirect in the AuthorizedPage.tsx and that let me get to the form.

A few small things:
It makes sense to make the inputs a little larger to accommodate the labels, but it does make the buttons feel a little off. Do you plan on increasing the button size to match the height? Or vertically center the buttons to align with the 'More actions' dropdown? I think if you increase the button height, you might also want to use --joy-fontSize-md for the font size in the buttons instead of the smaller text to make the button feel more proportioned.

The clear button does not seem to clear the task description.

On mobile, the 'More actions' and the buttons are a bit squished on one line, so perhaps the buttons should flow underneath the dropdown at small screen sizes.

@anarute
Copy link
Member

anarute commented Sep 27, 2023

I agree with Danielle's comment and would also add that I think we should make the dropdowns have autocomplete feature from the beginning, as keyboard navigation was the number one request from our users.

@anarute
Copy link
Member

anarute commented Sep 28, 2023

It seems the autocomplete clean up is not working well, once I select a value I cannot remove it:

Screencast.from.2023-09-28.13-51-31.webm

@anarute
Copy link
Member

anarute commented Sep 28, 2023

I think for this PR, adding the To and From fields should be enough, and then the timer, template and data fetching can be in new PRs, what do you think @dmtrek14 ?

@dmtrek14
Copy link
Collaborator

I think for this PR, adding the To and From fields should be enough, and then the timer, template and data fetching can be in new PRs, what do you think @dmtrek14 ?

I agree. It will help separate the work out a little better. We expect the timer to be a little complex and it makes sense for it to be its own PR.

@negreirosleo negreirosleo marked this pull request as ready for review September 29, 2023 21:01
frontend/src/app/tasks/hooks/useTaskTypes.ts Outdated Show resolved Hide resolved
frontend/src/app/tasks/hooks/useTaskTypes.ts Outdated Show resolved Hide resolved
frontend/src/app/tasks/hooks/useTaskTypes.ts Outdated Show resolved Hide resolved
frontend/src/app/tasks/page.tsx Outdated Show resolved Hide resolved
Copy link
Collaborator

@dmtrek14 dmtrek14 left a comment

Choose a reason for hiding this comment

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

Looks good to me - thank you!

@negreirosleo negreirosleo merged commit 64e9609 into main Oct 2, 2023
@negreirosleo negreirosleo deleted the create-task-form branch October 2, 2023 12:59
negreirosleo added a commit that referenced this pull request Mar 4, 2024
* Remove NextJs default styles

We will be using JoyUI theme for now so its safe to delete this

* Add ReactQuery to project

This lib is being installed to facilitate the communication with
the API and the state management for it.

* Create hooks to fetch projects and tasktypes

* Create Form page

* Add reset form action

* Switch Select for Autocomplete

* Refactor useForm types

* Add loading to select

* Improve Buttons positioning

* Fix Autocomplete clear

* Select Option on autocomplete with Tab

* Adjust Task to TaskType

* Reorder TaskForm fields
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.

3 participants