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

Show draft projects on users home page #872

Merged
merged 10 commits into from
Jun 13, 2024

Conversation

psh0078
Copy link
Collaborator

@psh0078 psh0078 commented Jun 10, 2024

This PR implements the feature to show draft projects on user's home page. It includes the CSS modifications to visually distinguish draft projects.

Will fix #864.

Changes I @psh0078 made in the codebase to implement the feature (show draft projects on users home page):

  • Created the MyDraftProjects query within backend/LexBoxApi/GraphQL/LexQueries.cs, integrating the MyDraftProjects field into the Query type definition in frontend/schema.graphql.
  • Added draft projects to load method in frontend/src/routes/(authenticated)/+page.ts.
  • Updated the frontend/src/routes/(authenticated)/+page.svelte file to handle both regular and draft projects under a unified allProjects variable. To do this, adjustments were made to ProjectList.svelte; previously, it accepted projects of type ProjectItem, which couldn't accommodate draft projects. The code was modified to accept ProjectItemWithDraftStatus instead.

CSS for draft projects:

  • Remove hover effect and box shadow
  • Add draft icon after project title
  • Replace user icon with clock icon and text “awaiting approval”
  • Replace “last change” with “requested”

@psh0078 psh0078 self-assigned this Jun 10, 2024
Copy link

github-actions bot commented Jun 10, 2024

UI unit Tests

11 tests  ±0   11 ✅ ±0   0s ⏱️ ±0s
 3 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 04bdab7. ± Comparison against base commit 037fb46.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jun 10, 2024

C# Unit Tests

52 tests   52 ✅  5s ⏱️
10 suites   0 💤
 1 files     0 ❌

Results for commit 04bdab7.

♻️ This comment has been updated with latest results.

frontend/src/routes/(authenticated)/+page.ts Outdated Show resolved Hide resolved
@psh0078
Copy link
Collaborator Author

psh0078 commented Jun 11, 2024

In the list view, we currently display five columns: Name, Code, Users, Last Change, and Type. Given that the 'Last Change' and 'Users' columns are not very descriptive for draft projects, we are leaving them blank for now. Should we consider adding a 'Requested Date/Time' column to provide more relevant information for draft projects?

image

@megahirt
Copy link
Contributor

Per in-office conversation, we don't want to change the column names/types. We do want to utilize the blank space in the last change column to display some text "awaiting approval". This isn't ideal, but this satisfied the requirement to clearly mark the project as requested/awaiting approval.

@psh0078 psh0078 marked this pull request as ready for review June 11, 2024 08:38
@megahirt
Copy link
Contributor

@psh0078 if you could add a screenshot to this PR of the latest version of both the list view and the grid view, that would be great!

@myieye myieye force-pushed the feat/show-draft-projects-in-dashboard branch from 1e967bb to da05bb9 Compare June 11, 2024 12:54
Copy link
Contributor

@myieye myieye left a comment

Choose a reason for hiding this comment

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

Hey @psh0078 Nice work here 🙂 👍

I've got a decent handful of small requests.

Also, our mobile view had been suffering for a while and the large badge in this PR made that more obvious, so I pushed a commit to improve that, which also required me to make a few small changes to the html.

So, make sure you have my commit, before you start making the changes I requested.

frontend/src/routes/(authenticated)/+page.svelte Outdated Show resolved Hide resolved
frontend/src/routes/(authenticated)/+page.svelte Outdated Show resolved Hide resolved
frontend/src/lib/components/ProjectList.svelte Outdated Show resolved Hide resolved
frontend/src/lib/components/ProjectList.svelte Outdated Show resolved Hide resolved
frontend/src/lib/components/ProjectList.svelte Outdated Show resolved Hide resolved
frontend/src/lib/components/ProjectList.svelte Outdated Show resolved Hide resolved
frontend/src/lib/components/ProjectList.svelte Outdated Show resolved Hide resolved
frontend/src/lib/components/ProjectList.svelte Outdated Show resolved Hide resolved
@psh0078
Copy link
Collaborator Author

psh0078 commented Jun 12, 2024

@psh0078 if you could add a screenshot to this PR of the latest version of both the list view and the grid view, that would be great!

Screenshot 2024-06-12 091014
Screenshot 2024-06-12 091021

@myieye
Copy link
Contributor

myieye commented Jun 12, 2024

@psh0078 looks great! I think you just need to make the icon yellow and then this is ready to merge (I think the screenshot is a bit of a lie right? In the screenshot the icon is yellow/warning, but in the code I think it's still blue/primary 😆)

Copy link
Contributor

@myieye myieye left a comment

Choose a reason for hiding this comment

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

Nice work 👍 🚀

@psh0078 psh0078 requested a review from hahn-kev June 13, 2024 02:00
@megahirt
Copy link
Contributor

Nice work! Just waiting on @hahn-kev to re-review / approve.

@myieye
Copy link
Contributor

myieye commented Jun 13, 2024

I don't think it's strictly necessary to wait for @hahn-kev's review. He only had a single change request and we don't have a "needs two approvals" policy.

@psh0078 psh0078 dismissed hahn-kev’s stale review June 13, 2024 08:49

Fixed. Tim suggested go ahead and merge it

@psh0078 psh0078 merged commit 0637c0e into develop Jun 13, 2024
14 checks passed
@myieye myieye deleted the feat/show-draft-projects-in-dashboard branch January 14, 2025 11:01
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.

Show draft projects (if any) on user's home page
5 participants