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

Creating a gallery view #8

Merged
merged 52 commits into from
Nov 17, 2022
Merged

Creating a gallery view #8

merged 52 commits into from
Nov 17, 2022

Conversation

CDPhu
Copy link
Collaborator

@CDPhu CDPhu commented Nov 2, 2022

Contributing.md needs some work, but so far the base is running off parcel
the view uses Fancybox and has several online images posted inside.
Click once to select the photo to view, and click it again to bring it to full size.
You can also drag the photos around when selected.

The navbar will also follow when scrolling down.
The username is used as a placeholder for now nothing there yet
the About page is not there yet
#2
test website

Copy link
Collaborator

@humphd humphd left a comment

Choose a reason for hiding this comment

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

Thanks for getting us started on this! I love that you did a demo site to show how it runs.

My first initial feedback:

  1. fancybox doesn't seem to be maintained any more. Looking at https://npmtrends.com/fancybox-vs-lightgallery-vs-lightgallery.js-vs-photoswipe-vs-swipebox it seems that https://photoswipe.com/ is the one that more people use, or https://github.com/sachinchoolur/lightGallery. I think we should use one of these.
  2. Add this library to the dependencies of package.json vs. asking the user to install it manually
  3. We won't have accounts or search, so you can remove both of those from the header
  4. Blue text on black background is hard to read
  5. I'd probably rename gallery.html to index.html so it resolves better
  6. Use a newer version of Parcel (2.x)
  7. Can we get rid of the JS in gallery.js and make it 100% static HTML?

@CDPhu
Copy link
Collaborator Author

CDPhu commented Nov 3, 2022

Which version of fancybox is this site talking about? because I know versions 1, 2, and 3 are now discontinued, but nothing is ever said about version 4.

@humphd
Copy link
Collaborator

humphd commented Nov 3, 2022

https://www.npmjs.com/package/@fancyapps/fancybox hasn't been updated in 4 years, I'd say it's dead. Also, it's based on jQuery, which isn't a good choice in 2022.

@CDPhu
Copy link
Collaborator Author

CDPhu commented Nov 5, 2022

I just changed it to photoswide and parcel should be 2.0 and above now. Its now 100% html and file has been renamed to index.html
New link after renaming to index.js https://lostbutton.github.io/my-photohub/

@CDPhu CDPhu requested a review from humphd November 6, 2022 01:41
CONTRIBUTING.md Outdated Show resolved Hide resolved
css/photoswipe.css Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@CDPhu CDPhu requested a review from humphd November 7, 2022 00:30
@CDPhu
Copy link
Collaborator Author

CDPhu commented Nov 9, 2022

What does "running it on GitHub Pages" mean? You don't run code on GitHub Pages.

it should be working on github pages as intended now

@CDPhu CDPhu marked this pull request as ready for review November 9, 2022 01:09
@CDPhu CDPhu marked this pull request as draft November 9, 2022 01:10
@CDPhu CDPhu marked this pull request as ready for review November 10, 2022 00:25
gallery.css Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
Copy link
Collaborator

@SerpentBytes SerpentBytes left a comment

Choose a reason for hiding this comment

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

I left some comments on your PR.

When I click on "test sample," it redirects me to https://lostbutton.github.io/my-photohub/gallery, which renders a 404 error.

When I navigate to https://lostbutton.github.io/my-photohub, it seems to work fine. Maybe you are deploying the website to the root path instead of /gallery?

@CDPhu
Copy link
Collaborator Author

CDPhu commented Nov 11, 2022

I left some comments on your PR.

When I click on "test sample," it redirects me to https://lostbutton.github.io/my-photohub/gallery, which renders a 404 error.

When I navigate to https://lostbutton.github.io/my-photohub, it seems to work fine. Maybe you are deploying the website to the root path instead of /gallery?

No that's not the case, I commented previously that when it was changed to index that https://lostbutton.github.io/my-photohub would be the link its deployed to. But I will look into your suggestions

@SerpentBytes
Copy link
Collaborator

SerpentBytes commented Nov 11, 2022

Lastly, on mobile devices tapping on a single image shows two in the preview. See below:
image

gallery.css Outdated Show resolved Hide resolved
Copy link
Collaborator

@SerpentBytes SerpentBytes left a comment

Choose a reason for hiding this comment

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

LGTM.

@CDPhu
Copy link
Collaborator Author

CDPhu commented Nov 14, 2022

Thanks for getting us started on this! I love that you did a demo site to show how it runs.

My first initial feedback:

  1. fancybox doesn't seem to be maintained any more. Looking at https://npmtrends.com/fancybox-vs-lightgallery-vs-lightgallery.js-vs-photoswipe-vs-swipebox it seems that https://photoswipe.com/ is the one that more people use, or https://github.com/sachinchoolur/lightGallery. I think we should use one of these.
  2. Add this library to the dependencies of package.json vs. asking the user to install it manually
  3. We won't have accounts or search, so you can remove both of those from the header
  4. Blue text on black background is hard to read
  5. I'd probably rename gallery.html to index.html so it resolves better
  6. Use a newer version of Parcel (2.x)
  7. Can we get rid of the JS in gallery.js and make it 100% static HTML?

Prof, for number 7 what do you mean get rid of js to make it 100% static HTML? I know its index now but the removing of JS still confuses me.

package.json Outdated
@@ -0,0 +1,29 @@
{
"name": "My-PhotoHub",
Copy link
Collaborator

Choose a reason for hiding this comment

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

We have 3 separate PRs that are all doing the same thing (creating package.json). A better approach for doing this in the future would be to start with a very small PR that adds a pacakge.json and then build on that. Open source should happen in small bite-sized chunks.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

So what should I do with the package.json?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Moved the discussion to Slack

@humphd
Copy link
Collaborator

humphd commented Nov 15, 2022

Prof, for number 7 what do you mean get rid of js to make it 100% static HTML? I know its index now but the removing of JS still confuses me.

Ideally we should produce a static HTML page that has everything rendered in our build step vs. having to build the DOM dynamically on load. It will be way faster if we do.

@CDPhu
Copy link
Collaborator Author

CDPhu commented Nov 15, 2022

Prof, for number 7 what do you mean get rid of js to make it 100% static HTML? I know its index now but the removing of JS still confuses me.

Ideally we should produce a static HTML page that has everything rendered in our build step vs. having to build the DOM dynamically on load. It will be way faster if we do.

For number 7, I can't remove the JS because the photoswipe relies on the modules inside. Unless you want me to write the script within the HTML file?

@humphd
Copy link
Collaborator

humphd commented Nov 15, 2022

I don't mean remove all JavaScript. I mean let's do as much in HTML as possible vs. having to set everything up at runtime with JS. It's fine to augment that with JS afterward.

@CDPhu
Copy link
Collaborator Author

CDPhu commented Nov 16, 2022

I don't mean remove all JavaScript. I mean let's do as much in HTML as possible vs. having to set everything up at runtime with JS. It's fine to augment that with JS afterward.

So would a better option would be to script what I have in java to the html file?

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