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

Version 2.0 #245

Merged
merged 100 commits into from
Mar 30, 2023
Merged

Version 2.0 #245

merged 100 commits into from
Mar 30, 2023

Conversation

timwis
Copy link
Owner

@timwis timwis commented Feb 21, 2023

As I was writing the upgrade guide for #244 I started jotting down the release notes, and thought I'd post them in a draft PR since we're close to being able to release anyway. Here's what I have so far. Let me know if I've missed anything.

Breaking changes

  • Upgraded ruby version to 3.1.2, and upgrade ruby and JavaScript dependencies to recent versions
  • Replaced built-in editing UI with Decap CMS (formerly known as Netlify CMS)
  • Restructured licenses.yml for compatibility with Decap CMS. As a result, site.data.licenses is now site.data.licenses.items.
  • Split categories.yml into collection (directory of files). As a result, site.data.categories is now site.dataset_categories.
  • Added out-of-the-box config for hosting on Netlify
  • Added GitHub Actions workflow for publishing to GitHub Pages
  • Removed default baseurl setting from _config.yml
  • Switched to parcel for JavaScript bundling instead of Webpack
  • Upgraded to Bootstrap v5, which means bootswatch themes no longer work

Non-breaking changes

  • Added support for uploading category and organization images
  • Ensured the site works without JavaScript
  • Added a /categories/ index page and a page per category
  • Added a homepage hero image

Deprecations

  • We now recommend hosting JKAN on Netlify, but still support GitHub Pages and other static hosting providers.
  • If you use GitHub Pages, you'll need to switch on GitHub Actions in your repository to replace the legacy publishing workflow.

Contributors

  • dracos
  • bryanquigley
  • lukemckinstry
  • lydiascarf
  • timwis

This was necessary to support editing in Netlify CMS. See #207.
I've added a line in index.html that should provide backwards compatibility. Note that this commit breaks editing. This could be fixed as well, but since it's being removed as part of the Netlify CMS milestone, I haven't included it here.
license, category, maintainer, maintainer_email
Without this, netlify assumes this is a Node.js application. I think if we add jekyll to Gemfile, Netlify would auto-detect properly, and we wouldn't need this file. But I don't want the jekyll version to get out of sync with the github-pages gem, so let's stick with this for now.
This should be unnecessary now that we explicitly declare jekyll as a dependency in Gemfile
Troubleshooting netlify build
This no longer makes sense as a default setting when the recommended hosting platform is Netlify.
It may also be the case that GitHub Pages now automatically adds this setting anyway, which I will test.
Previously, the JavaScript expected baseurl to have a value - at least an empty string. But baseurl should
be able to be omitted completely, per https://ben.balter.com/jekyll-style-guide/config/#baseurl
`GITHUB_CLIENT_ID` and `GATEKEEPER_HOST` are no longer in use
This is only necessary when using the git-gateway backend for Netlify CMS. Since we're recommending using the GitHub (OAuth) backend, I think we should remove it by default.
@timwis timwis marked this pull request as ready for review March 1, 2023 07:02
@BryanQuigley
Copy link
Collaborator

Hi Tim!

Thanks for all your work on JKAN!

Azavea just joined https://element84.com/ so things are changing a bit here. I just asked if we can do some UI review.

I'm not sure we need to sync v2 back to gh-pages. They can stand on their own branches and we can just make v2 the default. This is especially true because the gh-pages branch name is just a hold over from the old way to deploy.

The release notes look good to me. @lydiascarf is working on some local development instructions to add as well (the docker ones I wrote early are broken). We also plan to be getting an OpenDataPhilly test site up soon.

@lydiascarf
Copy link
Collaborator

@timwis #254 fixes docker compose and gets us off of the infrequently maintained jekyll docker images. Could you please review and add this to the release notes? Otherwise, they look good to me!

- repository added to config
- moved from Jekyll image to Dockerfile based on Ruby image
@netlify
Copy link

netlify bot commented Mar 13, 2023

Deploy Preview for jkan-demo ready!

Name Link
🔨 Latest commit 758556e
🔍 Latest deploy log https://app.netlify.com/sites/jkan-demo/deploys/64256a8e4f9e810007ba8c0c
😎 Deploy Preview https://deploy-preview-245--jkan-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@timwis
Copy link
Owner Author

timwis commented Mar 20, 2023

@BryanQuigley Interesting point about not merging the branches... Although, would there be much benefit in leaving v1 around as an active branch? I don't think we want to support it, so if it's just for posterity, perhaps a tag in the git history could suffice? 🤔

Also, I'd love if we could name the default branch main (instead of gh-pages or v2). Simple enough to rename v2 to main, and make it the repo's default branch, but the tricky thing is that I'm not sure how forks and cross-fork PRs would work if we change the default branch 😬

@BryanQuigley
Copy link
Collaborator

Good point, just a git tag is enough - and I do agree main name is nicer...

We had to break our fork connection (or else PRs against ODP would try to be against JKAN by default) so the naming doesn't really matter for ODP. Currently working on a plan for how to keep better synced with JKAN (current plan is just rebasing regularly).

Bryan Quigley and others added 11 commits March 20, 2023 10:06
Dropped jekyll-npm mentioning and fixing up container workflow.
Also added newer version of node/npm from suggestion.

Drop hadolint check as well.
Fixes include:
- Jumbotron
- List Groups
badge-pill -> rounded-pill
badge-* -> bg-*
float-right -> float-end
Bootstrap v5 removed background from breadcrumbs by default
 * Drop old Add-categories linl
 * UI: Sidebar: Increase spacing between Categories and Organizations
 * The original suggestion was Change count pill for selected category and X button to white background
   with Tim's suggestion moved to bg-light text-dark.  Also changed in datasets.html to use primary blue.
 * UI: Results: Increase spacing to make list more legible. I just added top spacing to datasets to the separator is more in the middle.
Fixes and adds hover effect to categories grid, changes button copy
@timwis
Copy link
Owner Author

timwis commented Mar 30, 2023

but the tricky thing is that I'm not sure how forks and cross-fork PRs would work if we change the default branch 😬

I've just created a new repository to test this out. I forked it from another user account, then changed the name of the default branch in the upstream repository. I went back to my fork, as the other user, and GitHub was clever enough to flag it to me!

Screenshot 2023-03-30 at 12 04 24

Even better, the "Sync fork" button still works, despite the upstream and downstream repos having two different branch names.

Well done, GitHub!

I'll just update the release notes and merge this into gh-pages, then tag it as a release, and rename the branch to main.

@timwis timwis merged commit e1bbde6 into gh-pages Mar 30, 2023
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.

None yet

5 participants