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

Split data file into sub files #672

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

komarovb
Copy link

Reason for Change

Changes

  • Split the _data/conferences.yml into individual sub-files per year under _data/conferences/
  • Added a liquid template prepare_conference_data.liquid to merge all .yml files within _data/conferences/
  • Replaced conferences variable assignment with an include call to the new template
  • Updated the verify_data task in the Rakefile to take into account the new file structure
  • Updated the README.md file
  • Tested that everything works as expected

Minor

I used the following code snippet to verify that the data split was performed correctly.

require 'yaml'
require 'date'

old_data = YAML.load(File.read("_data/conferences.yml"), permitted_classes: [Date])

new_data = Dir.glob("_data/conferences/*yml").reduce([]) do |all_data, file|
  all_data + YAML.load(File.read(file), permitted_classes: [Date])
end 

puts new_data == old_data

@@ -0,0 +1,7 @@
{% assign conferences = nil %}
Copy link
Collaborator

@marcoroth marcoroth Jul 4, 2024

Choose a reason for hiding this comment

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

Thanks for giving this a short @komarovb!

Looking at this, I'm wondering if this doesn't make things more complicated.
Maybe we could also rethink about the way we show conferences.

Since we have the conferences split up per year now, maybe we should also have dedicated pages per year to look at past conferences. This would also simplify this part since we don't have to concatenate the conferences.

What do you think?

Copy link
Author

Choose a reason for hiding this comment

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

Hey @marcoroth, thank you for looking at this.

I agree that the implementation is a bit trickier now, but the main idea, as far as I understand, is to make it easier for people to add their events to the website and avoid navigating through the 2.5k+ lines of the conferences file.

In terms of user experience, I personally like how the website feels at the moment. The home page is clear and concise, showing not only current conferences but also future ones. One simplification that comes to mind is to drop concatenating all the files and just use the current and next year's data for the home and CFP pages.

Regarding past conferences, it might be beneficial to show them grouped by year, perhaps using an accordion to simplify navigation to a particular year. Here is a primitive example:

Screenshot 2024-07-04 at 23 13 20

I could prototype something to give it a feel, and we can see if it's useful.

Let me know what you think.

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

2 participants