Skip to content

Conversation

@oilagh
Copy link
Contributor

@oilagh oilagh commented Jan 26, 2026

Description

This sets up the Requests page which displays all of the requests in a Kanban style showing Pending, Assigned, In Progress, Completed

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • [ X] New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ X] Refactoring (code improvement without changing functionality)
  • Documentation update
  • Configuration/infrastructure change
  • Performance improvement
  • Test coverage improvement

Related Issue(s)

#72

Closes # 72
Related to # 72

What Changed?

  • Added a Requests Page
  • Added RequestInformationCard component
    -Fixed naming issue with GET request endpoint (GetRequest func name -> FindRequest)

Testing & Validation

How this was tested

  1. I loaded the page and messed around with it

Screenshots/Recordings

Unfinished Work & Known Issues

  • None, this PR is complete and production-ready
  • [ X] The following items are intentionally deferred:
    • I need to actually call the API I didnt do this because we don't have a GET requests endpoint (only a GET requests:id) this will be done in my next PR :P


Notes & Nuances

  • I used the intersection observer pattern

Pre-Merge Checklist

Code Quality

  • Code follows the project's style guidelines and conventions
  • Self-review completed (I've reviewed my own code for obvious issues)
  • No debugging code, console logs, or commented-out code left behind
  • No merge conflicts with the base branch
  • Meaningful commit messages that explain the "why"

Testing & CI

  • All CI checks are passing
  • All new and existing tests pass locally
  • Test coverage hasn't decreased (or decrease is justified)
  • Linting passes without errors

Documentation

  • Code is self-documenting or includes helpful comments for complex logic
  • API documentation updated (if backend endpoints changed)
  • Type definitions are accurate and up-to-date

Reviewer Notes

  • Areas needing extra attention: ...
  • Questions for reviewers:
    I need help 😞 importing the requests model from our backend folder into files in our clients/web/
    no matter what the import path wouldn't work for me T_T

Fixed a naming inconsistency between get request and find request from one of my previous tickets (whoops)

Created information cards with request information on them

Kanban then loads these into 4 categories and uses the intersection observer pattern to see when the veiwport contains the end of the last information card and loads more if the cursor has more rows to load
Copy link
Contributor

@Dao-Ho Dao-Ho left a comment

Choose a reason for hiding this comment

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

Great rip! 🔥 For frontend prs, I would always try to include a visual attachment (video of you playing around with the page) to show what it looks like. Also, for a feature like this, I would personally try to get the logic working in the backend first before doing the FE, especially for pagination logic. It sets up a better base for you to connect immediately without having to leave boilerplate code in prod FE. Also, a big comment here is to avoid using inline CSS styling, we're using Tailwind for our FE stack.

}

func (r *RequestsHandler) GetRequest(c *fiber.Ctx) error {
func (r *RequestsHandler) FindRequest(c *fiber.Ctx) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is actually correct format here.
Get prefix in the handler is the convention we want. 'Find' prefix should be used in the repository.

Thanks for being conscious of this though 🙏

api.Route("/request", func(r fiber.Router) {
r.Post("/", reqsHandler.CreateRequest)
r.Post("/:id", reqsHandler.GetRequest)
r.Post("/:id", reqsHandler.FindRequest)
Copy link
Contributor

Choose a reason for hiding this comment

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

Also, while you're at it, can you change this to be
r.Get("/:id", reqsHandler.GetRequest) ?
Sorry seems like I missed this typo when reviewing

</div>
</div>
)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Please avoid using inline styling here, our default convention here is to use tailwind for styling. (lmk if you need help with this)

style={{ textAlign: 'center', padding: '10px', color: '#999' }}
>
No more requests
</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we need this, let's not show anything when you render the entire list

{hasMore && (
<div
ref={observerTarget}
style={{ textAlign: 'center', padding: '10px' }}
Copy link
Contributor

Choose a reason for hiding this comment

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

again, no inline CSS styling here

ref={observerTarget}
style={{ textAlign: 'center', padding: '10px' }}
>
{isLoading && 'Loading more...'}
Copy link
Contributor

Choose a reason for hiding this comment

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

For visual purposes, it's a pretty jarring experience to keep seeing "loading more..." every time you reach the bottom. You should just propagate more, if there are more left to be shown. If you need to display some feedback here (like a loading state), it indicates that our query for the paginated list is inefficient, and we should be fixing that instead.

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