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

[#296] adds mastodon_url, bluesky_handle to participant socials #324

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

willbuck
Copy link

@willbuck willbuck commented Feb 17, 2025

Closes #296

I also added the X to twitter and marked all socials as optional

See below:

Screenshot 2025-02-16 at 8 34 19 PM Screenshot 2025-02-16 at 8 34 03 PM

I'm not sure if I was meant to add db migrations beyond the schema.rb changes, let me know.

One thing that also isn't clear to me is why the mastodon input is shorter than the others... It's the same data type, but for some reason didn't get the li.string class that widens the other fields to 74%

Screenshot 2025-02-16 at 9 09 13 PM Screenshot 2025-02-16 at 9 09 02 PM

This is my first real rails change, so please give plenty of feedback on any conventions I'm not following or beginner mistakes I'm making!

…als, adds X qualifier to twitter, marks all optional
@pcantrell
Copy link
Contributor

Welcome to the project, Will, and congratulations on getting the PR going!

Yes, you should always add migrations for any database changes. In Rails, schema.rb is strictly a machine-generated file, never to be edited by hand. What you commit should always be the result of running rails db:migrate.


I wonder whether it might make sense to add a relation instead of having many separate columns for different types of social media? Something like:

  • Participant – has many → ProfileLinks
  • ProfileLink – belongs to → Participant, ProfileLinkType
  • ProfileLinkType determines name and icon, is seeded with several socials and (maybe??) personal site

Comment on lines +81 to +82
t.string "mastodon_url"
t.string "bluesky_handle"
Copy link
Contributor

@experimatt experimatt Mar 8, 2025

Choose a reason for hiding this comment

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

How did you make these database changes, if not with a database migration?

Knowing that you're new to rails, you may want to read through this guide: https://guides.rubyonrails.org/active_record_migrations.html


In theory you should have been able to generate a migration (which would create a file within db/migrations/) for this with something like this one-liner (run from the terminal)

rails generate migration AddMastodonUrlBlueskyHandleToParticipants mastodon_url:string bluesky_handle:string

@pcantrell
Copy link
Contributor

@willbuck After discussion on Slack and today’s video call, we decided to keep things simple and go with the approach in #340 of removing specific sites from the DB altogether, and moving personal / social links into the Markdown text itself. That solves the immediate problem of Mastodon & Bsky support, albeit in a rudimentary way. I proposed adding a Masotodon-style profile key-value-pair section at some point in the future, but we don’t want to delay getting the site live for this year’s sessions.

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.

Add support for Mastodon handles / other social media?
3 participants