Skip to content
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

[#2PlaysAMonth]: Image Gallery - Create a responsive image gallery by using the free Unsplash API #974

Merged
merged 23 commits into from
Mar 8, 2023

Conversation

siddhantsiddh15
Copy link
Contributor

@siddhantsiddh15 siddhantsiddh15 commented Feb 16, 2023

First thing, PLEASE READ THIS: ReactPlay Code Review Checklist

Description

The project contains use of Unsplash API, which is fetched using axios and then populated in the Photo Component.

Following things have been used in this project:

  1. useState
  2. useEffect
  3. React Form
  4. Component Refactoring
  5. Material UI icon
  6. Axios npm module
  7. CSS Grid
  8. Infinite scroll functionality(This feature is still not showing the react play app but is working on local file system. I am working on it)

The app is responsive and redirects to the individual images and profiles when clicked on it.

Fixes #910

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

To see working of the app repeat the following

  1. Go to the app. Some images are loaded on the screen by default
  2. Search for any keyword. The screen will update with new images.
  3. Hover over any image, the cursor will turn to pointer.
  4. On clicking any image, the page will re direct to that image.
  5. On hovering, the profile name, likes will come in front of the image. On clicking the profile photo, the profile of the image contributor will open
  6. The page on scrolling down should show more images.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

Screenshots or example output

image

image

image

This project contains the following principles of React

1. useState
2. useEffect
3. promise handling using async await
4. react form

Following things have been used while making this project

1. API handling from unsplash
2. Grid
3. Individual components (SearchBar can be reused separately)
4. Have implemented the infinite scrolling where the images array are
   populated once we scroll to the bottom of the page
5. Have used the Material UI icon for search bar

The project is responsive as well.

Following things are pending and trying to figure out the reason for the
same

1. Infinite scrolling is working on local system but when same code is
   being used in React play it is not working
2. Will try to add React-Router and Redux functionaly for state
   management.
@vercel
Copy link

vercel bot commented Feb 16, 2023

@siddhantsiddh15 is attempting to deploy a commit to a Personal Account owned by @reactplay on Vercel.

@reactplay first needs to authorize it.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Hello! Thank you for your contribution 😊.
Please reference the issue number in the description if you are fixing a bug.
If you are implementing a feature request, please check with the maintainers that the feature will be accepted first.
Stale Marking : After 30 days of inactivity this PR will be marked as stale PR and it will be closed and locked in 7 days if no further activity occurs.

@Sachin-chaurasiya
Copy link
Member

@siddhantsiddh15 , Thanks for the PR.

I would request you change the PR title to "[#2PlaysAMonth]: Image Gallery - Create a responsive image gallery by using the free Unsplash API"

and the second thing is to link your PR with the issue by adding the below line in the PR description.

Example:

Fixes #910

@vercel
Copy link

vercel bot commented Feb 16, 2023

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

Name Status Preview Comments Updated
react-play ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 5, 2023 at 7:28PM (UTC)

@siddhantsiddh15 siddhantsiddh15 changed the title Unsplash api siddhantsiddh15 [#2PlaysAMonth]: Image Gallery - Create a responsive image gallery by using the free Unsplash API Feb 16, 2023
@siddhantsiddh15
Copy link
Contributor Author

Greetings,

I have updated the pull request name and linked the issue with the issue number
image

Thanks

@Sachin-chaurasiya
Copy link
Member

@siddhantsiddh15 , Please format and lint the code by following this guide.
https://github.com/reactplay/react-play#format-the-code

@siddhantsiddh15
Copy link
Contributor Author

Greetings

Have formatted the code as per the guidelines as mentioned here https://github.com/reactplay/react-play#format-the-code and then pushed the code in the branch.

Thanks

Copy link
Member

@atapas atapas left a comment

Choose a reason for hiding this comment

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

@siddhantsiddh15 Review comments

also please record your demo on stackstream and add the link by editing your play. Thanks

@@ -0,0 +1,113 @@
/* enter stlyes here */
* {
Copy link
Member

Choose a reason for hiding this comment

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

Please do not override the styles this way. Add a unqie class name in front of all the styles in all the CSS files so that the override changes are less.

You can add an additional style name here and use that to prefix all styles in all CSS files.

// src/plays/image-gallery-using-unsplash-api/ImageGalleryUsingUnsplashApi.js

<div className="play-details-body">

@@ -0,0 +1,112 @@
/* enter stlyes here */
.body {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Have made changes here. Earlier it was *{ padding: 0;
margin: 0;
font-family: 'IBM Plex Sans', sans-serif;
background-color: whitesmoke;
} .

Now it is under a className body.

Copy link
Member

Choose a reason for hiding this comment

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

The class name should prefix all the styles in the CSS file.

@atapas
Copy link
Member

atapas commented Feb 18, 2023

@siddhantsiddh15 Kindly resolve the merge conflict

<PlayHeader play={props} />
<div className="play-details-body">
{/* Your Code Starts Here */}
<div className="body">
Copy link
Member

Choose a reason for hiding this comment

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

I would certainly change the class name from body to something more unique :) How about unsplash-ig?

@@ -0,0 +1,112 @@
/* enter stlyes here */
.body {
Copy link
Member

Choose a reason for hiding this comment

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

The class name should prefix all the styles in the CSS file.

@siddhantsiddh15
Copy link
Contributor Author

image
These errors are not in my edited files, what can I do to run the react play?

@atapas
Copy link
Member

atapas commented Feb 20, 2023

@siddhantsiddh15 Catch me up on Discord today to close it.

@siddhantsiddh15
Copy link
Contributor Author

siddhantsiddh15 commented Feb 24, 2023

Hello Tapas,
I have screen recorded and uploaded the video here for https://react-play-git-fork-siddhantsiddh15-unsplash-8f3010-reactplayio.vercel.app/ . The website is responsive and is working correctly, I don't know what more to change now.

Thankyou

@atapas
Copy link
Member

atapas commented Feb 26, 2023

@siddhantsiddh15 almost there..

please add a cover image

image

Also edit your play from localhost and add the stream recording.

Ping where when you done, will merge it.

@atapas
Copy link
Member

atapas commented Feb 28, 2023

@siddhantsiddh15 let us know when done

@siddhantsiddh15
Copy link
Contributor Author

Have added the cover image.
image

@atapas
Copy link
Member

atapas commented Feb 28, 2023

Have added the cover image. image

Thanks!

  • The cover image should be in KBs, please reduce the size.
  • Also confirm that your demo recording has been added to the play by editing it.

@siddhantsiddh15
Copy link
Contributor Author

siddhantsiddh15 commented Feb 28, 2023

Greetings,

I have not added the demo recording in the Play. I have updated the size of the cover.png to 135 kb.

Regards

@atapas
Copy link
Member

atapas commented Feb 28, 2023

Greetings,

I have not added the demo recording in the Play. I have updated the size of the cover.png to 135 kb.

Regards

Can you please add the demo recording too.. then its al done.

@siddhantsiddh15
Copy link
Contributor Author

Cannot do it. Having difficulty. Can we skip the recording portion?

@atapas
Copy link
Member

atapas commented Feb 28, 2023

Cannot do it. Having difficulty. Can we skip the recording portion?

Ok, no worries, no pressure. It's still valuable to get your work in.

I am just curious about what kind of issues you are facing. If you can post about it in our Discord, I may try the resolution.. In fact, you can add the recording after merge too...(before 5th March)

@siddhantsiddh15
Copy link
Contributor Author

siddhantsiddh15 commented Mar 1, 2023

I am having slow internet connection due to the place I have travelled to, recording is a big file to upload.
I will try to upload the video if I get any broadband connection.

@koustov
Copy link
Member

koustov commented Mar 3, 2023

Hey @siddhantsiddh15 , this play looks cool. I will be waiting for the video link to updated before merging it to production branch

@siddhantsiddh15
Copy link
Contributor Author

Okay, will update it by tonight.

@siddhantsiddh15
Copy link
Contributor Author

siddhantsiddh15 commented Mar 3, 2023

Hey @siddhantsiddh15 , this play looks cool. I will be waiting for the video link to updated before merging it to production branch

I have uploaded here the updated video of the play. I have checked the responsiveness and working of my play. The delay from my side was unwanted, I have uploaded the video as soon as I got good internet connection.

@koustov
Copy link
Member

koustov commented Mar 5, 2023

Hey @siddhantsiddh15 , this play looks cool. I will be waiting for the video link to updated before merging it to production branch

I have uploaded here the updated video of the play. I have checked the responsiveness and working of my play. The delay from my side was unwanted, I have uploaded the video as soon as I got good internet connection.

Well the video should be on https://stack-stream.com/
image

I can get this play merged if everything is ok however please record a stackstream video before EOD

@koustov
Copy link
Member

koustov commented Mar 6, 2023

@atapas you need to unblock in order to merge this PR
@siddhantsiddh15 please record demo on stackstream

@atapas atapas merged commit 4cdcf31 into reactplay:main Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[#2PlaysAMonth]: Image Gallery - Create a responsive image gallery by using the free Unsplash API
4 participants