-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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: dashboard widgets #3362
feat: dashboard widgets #3362
Conversation
…nto feat/dashboard-widgets
…nto feat/dashboard-widgets
…nto feat/dashboard-widgets
…/plane into feat/dashboard-widgets
…nto feat/dashboard-widgets
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make the necessary changes and address the comments
import DarkImage from "public/empty-state/dashboard/dark/recent-collaborators.svg"; | ||
import LightImage from "public/empty-state/dashboard/light/recent-collaborators.svg"; | ||
// helpers | ||
import { cn } from "helpers/common.helper"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the empty states look very similar to each other. could you please create a common component and re use that in all the empty states
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The empty states vary in terms of content and structure, I don't think it'll make much sense as we are going to have more widgets in the future with different empty states structure.
web/components/dashboard/widgets/issue-panels/created-issues-list.tsx
Outdated
Show resolved
Hide resolved
{widgetStats.map((activity) => ( | ||
<div key={activity.id} className="flex gap-5"> | ||
<div className="flex-shrink-0"> | ||
{activity.field ? ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please avoid conditionals inside tsx, It will make it look more readable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As there are too many conditions inside tsx, we better break this down into smaller components.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This same logic is being used wherever we are rendering activity, I think it'll be better to have a separate PR just to refactor the activity logic.
* fix: created dashboard, widgets and dashboard widget model * fix: new user home dashboard * chore: recent projects list * chore: recent collaborators * chore: priority order change * chore: payload changes * chore: collaborator's active issue count * chore: all dashboard widgets added with services and typs * chore: centered metric for pie chart * chore: widget filters * chore: created issue filter * fix: created and assigned issues payload change * chore: created issue payload change * fix: date filter change * chore: implement filters * fix: added expansion fields * fix: changed issue structure with relation * chore: new issues response * fix: project member fix * chore: updated issue_relation structure * chore: code cleanup * chore: update issues response and added empty states * fix: button text wrap * chore: update empty state messages * fix: filters * chore: update dark mode empty states * build-error: Type check in the issue relation service * fix: issues redirection * fix: project empty state * chore: project member active check * chore: project member check in state and priority * chore: remove console logs and replace harcoded values with constants * fix: code refactoring * fix: key name changed * refactor: mapping through similar components using an array * fix: build errors --------- Co-authored-by: Aaryan Khandelwal <aaryankhandu123@gmail.com> Co-authored-by: gurusainath <gurusainath007@gmail.com>
* fix: created dashboard, widgets and dashboard widget model * fix: new user home dashboard * chore: recent projects list * chore: recent collaborators * chore: priority order change * chore: payload changes * chore: collaborator's active issue count * chore: all dashboard widgets added with services and typs * chore: centered metric for pie chart * chore: widget filters * chore: created issue filter * fix: created and assigned issues payload change * chore: created issue payload change * fix: date filter change * chore: implement filters * fix: added expansion fields * fix: changed issue structure with relation * chore: new issues response * fix: project member fix * chore: updated issue_relation structure * chore: code cleanup * chore: update issues response and added empty states * fix: button text wrap * chore: update empty state messages * fix: filters * chore: update dark mode empty states * build-error: Type check in the issue relation service * fix: issues redirection * fix: project empty state * chore: project member active check * chore: project member check in state and priority * chore: remove console logs and replace harcoded values with constants * fix: code refactoring * fix: key name changed * refactor: mapping through similar components using an array * fix: build errors --------- Co-authored-by: Aaryan Khandelwal <aaryankhandu123@gmail.com> Co-authored-by: gurusainath <gurusainath007@gmail.com>
Dashboard widgets
This PR introduces an enhanced version of the dashboard, providing users with a personalised home dashboard experience using multiple widgets.
Screen.Recording.2024-01-17.at.5.45.58.AM.mov
There are 8 widgets in total, including-
1. Statistics overview:
2. Assigned issues:
today
,this week
,this month
andthis year
.3. Created issues:
Each issue of the above two widgets can be opened in the peek overview.
4. Issues by state groups:
5. Issues by priority:
6. My activity:
7. My projects:
8. Collaborators
Implementation:
dashboard.store
) to store the widget details and statistics, and other necessary actions and computed functions, including-Other updates:
@plane/ui Button
component to use classNames usingclsx
andtailwind-merge
.@plane/ui PriorityIcon
component logic and refactored the component.