Skip to content

Conversation

valyefimov
Copy link
Contributor

@valyefimov valyefimov commented Mar 2, 2023

📌 References

📘 Description

🎥 Screenshot or Video

https://www.loom.com/share/714b30cdc94e48de84bf953bfe0a6329

🍰 Checklist:

@valyefimov valyefimov added the WIP Work in progress label Mar 2, 2023
@vercel
Copy link

vercel bot commented Mar 2, 2023

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

Name Status Preview Comments Updated (UTC)
wonderverse-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 3, 2023 8:42pm
wondrous-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 3, 2023 8:42pm

@valyefimov valyefimov changed the title wip: make the calendar view include more stuff, like grants, proposals, milestones, on to the same page wip: make the calendar view include grants, proposals, milestones Mar 2, 2023
…age-for-all

# Conflicts:
#	wondrous-app/components/organization/wrapper/BoardPageHeader.tsx
#	wondrous-app/graphql/fragments/task.ts
@valyefimov valyefimov changed the title wip: make the calendar view include grants, proposals, milestones feat: make the calendar view include grants, proposals, milestones Mar 17, 2023
@valyefimov valyefimov marked this pull request as ready for review March 17, 2023 22:54
@valyefimov valyefimov self-assigned this Mar 17, 2023
@valyefimov valyefimov requested review from Lamperoyge, andywong418 and terryli0095 and removed request for Lamperoyge March 17, 2023 23:02
Copy link
Contributor

@andywong418 andywong418 left a comment

Choose a reason for hiding this comment

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

Great stuff! Just a couple of questions

date: null,
fromDate: startOfMonth(new Date()),
labelId: null,
limit: 1000,
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason we're not paginating here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

makes sense to paginate data

  • for day view - load more when you scroll down
  • for week view - load more when the user clicks "Show more" button and scrolls down

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes exactly!

],
},
// {
// name: 'labelId',
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need this commented code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no, we don't. I'll remove it

@valyefimov valyefimov changed the title feat: make the calendar view include grants, proposals, milestones wip: make the calendar view include grants, proposals, milestones Mar 26, 2023
@valyefimov valyefimov added WIP Work in progress and removed Ready for code review labels Mar 26, 2023
@valyefimov valyefimov changed the title wip: make the calendar view include grants, proposals, milestones Make the calendar view include grants, proposals, milestones Mar 28, 2023
@valyefimov valyefimov added Ready for code review and removed WIP Work in progress labels Mar 28, 2023
@valyefimov valyefimov force-pushed the feature/calendar-page-for-all branch from f6ae3ee to e972280 Compare March 28, 2023 12:38
@valyefimov
Copy link
Contributor Author

@andywong418 @terryli0095
I've tried to implement the loading when you scroll feature in order to consume fewer resources. However, I have encountered some challenges when trying to find the right solution. For the month view, I've to get 3 records (tasks, bounties, grants, and proposals) for every day, and in order to do this, I need to write a heavy SQL query that probably won't use indexes.

Additionally, when a user opens the modal to view more tasks, I need to load more tasks/bounties, proposals, milestones, and grants. This means I need to keep track of the count and current index for every entity. I have tried multiple solutions for this, but I have not found a perfect one yet.

So, the solution I have implemented is to leave the limit to 1000 and load all tasks/bounties, proposals, milestones, and grants for the month/week view. However, I only display a limited count to not render all and load more when the user scrolls down. For the week view, I display only 10 records for a day and added a "view more" button (similar to what we have for the month view).

I understand that this may not be the ideal solution, but I believe it's the best option given the requirements and challenges I've encountered.

view-more-tasks

@valyefimov valyefimov requested a review from andywong418 March 28, 2023 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants