codeforpdx / codeforpdx/PASS

onClick of pin icon to move client to top of the table

Open
#221 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
38
Forks
23
Avg merge
11m
Merged PRs (30d)
4

Description

Issue (Updated 10/31/2023 by Ka Hung Lee):

At the moment, we had replaced the old Contact List Table with a Data Grid from Material UI. (See screenshot below):

Screen Shot 2023-10-31 at 19 47 40

The "Pin" column has been removed, however, it still utilizes the same list of objects (called contacts in ContactListTable.jsx) pulled from Solid to generate the list:

Screen Shot 2023-10-31 at 19 47 53


Direction:

Two thoughts (original):

  1. Create a "priority" field in the .ttl file - so we can toggle it true/false.
  2. Create a function that pushes this client to the front of the sorted clientList array (and thus top of table)
  3. Another approach entirely 🤷🏻‍♂️

(Previous styling for table)
Screenshot 2023-06-06 at 1 18 42 PM

Updates (10/31/2023):

Personally, I like the first approach suggested by Scott and think could be a viable solution. We could simply add "priority"/"pinned" as part of each Person object in contacts and have it be represented by a boolean, similar to how messages are utilizes booleans for the read/unread status. A true status would render a red pin and false would render an outlined pin. As for how we could get the people to show up first, we could include this new attribute as part of the initialState in the MUI Data Grid.

The custom useContactsList hook is how we currently fetch this data from Solid. It also includes the code where this object is generated as a serialized RDF Thing on Solid, (see Line 18 in src/hooks/useContactsList.js of Development).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with ContactListTable.jsx and src/hooks/useContactsList.js, where contacts are fetched from Solid and serialized. Review how the MUI Data Grid initialState and current contact objects are built, then confirm the chosen pin or priority approach. Done means a pin can be toggled and the pinned client appears at the top of the table with the intended visual state.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.