frontendstudygroup / frontendstudygroup.github.io

Web application for the frontend study group from WomenWhoCode Frontend track.
https://frontendstudygroup.github.io/
17 stars 17 forks source link

Add toggle for resources view to switch between table/cards view #40

Closed sunithapatel closed 3 years ago

sunithapatel commented 3 years ago

Add toggle for Resources pages to view the list of internships as a table using plain vanilla HTML/CSS/JS.

Here is a sample of what I am thinking of that I took from this article (but don't use the libraries referenced here :)) https://blog.logrocket.com/converting-tables-to-grids-with-react-compound-components/

image

princiya commented 3 years ago

Love this @sunithapatel , thanks for creating this issue.

Priyami commented 3 years ago

This is so nice. I would like to work on this. @sunithapatel assign me to this.

sunithapatel commented 3 years ago

Sure, you got it!

sunithapatel commented 3 years ago

By the way, feel free to design the table and those buttons anyway you like - this was only a suggestion of some patterns I have seen with this before. :)

Priyami commented 3 years ago

@princiya and @sunithapatel Created the Toggle button for the card/table view and its functionality is working well. I have an issue with the Table view. The table header gets the data from ResourceList using Object/key mapping. So It retrieves all the keys and renders the empty <th> tag. But it is required to have an ID, name, and URL for my table view.

Tableview
Priyami commented 3 years ago

Can I make PR to review my code?

sunithapatel commented 3 years ago

Yes, you can make a PR and we can review it.

sunithapatel commented 3 years ago

It sounds like the table header should not be part of getting the data, you should just set it to the 3 columns. The <tr> is what needs to be mapped from the data. But can take a look at your code to be sure. :)

Priyami commented 3 years ago

I made PR - it shows 'All checks have failed'. Anything that I missed?, I am not sure about this error.

sunithapatel commented 3 years ago

I made PR - it shows 'All checks have failed'. Anything that I missed?, I am not sure about this error.

Commented on this in the PR. Let us know if you need more help understanding how to fix it.

princiya commented 3 years ago

Fixed #44