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

Discard talk #525

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

Discard talk #525

wants to merge 5 commits into from

Conversation

adrienpoly
Copy link
Owner

@adrienpoly adrienpoly commented Dec 15, 2024

this is a first stab at #372

while implementing the feature and in particular trying the discard the talks from Zzak I realised that since a talk can have multiple speaker (https://www.rubyvideo.dev/talks/building-cli-apps-for-everyone) if a talk is discarded then it will be hidden for all speakers of that talk.

I wonder if we should keep it like that or discard the SpeakerTalk relationship?

close #372

@adrienpoly adrienpoly requested a review from marcoroth December 15, 2024 21:58
@adrienpoly adrienpoly marked this pull request as draft December 15, 2024 21:58
@@ -0,0 +1,6 @@
class AddDiscardedAtToTalks < ActiveRecord::Migration[8.0]
def change
add_column :talks, :discarded_at, :datetime
Copy link
Collaborator

@marcoroth marcoroth Dec 16, 2024

Choose a reason for hiding this comment

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

I feel we should call this something like hidden_at rather than discarded_at, since this feature is more about "hiding" a talk from showing up.

Copy link
Owner Author

Choose a reason for hiding this comment

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

discarded_at is the attribute used by the gem discard but we could easily do without it with a simple concern.

For me the main question remains do we hide the talk or hide the SpeakerTalk relation
If we hide the relation then some things we wanted to do becomes a bit more tricky

  • does appear in the event index view as grayedout (only if all SpeakerTalk are hidden)
  • doesn't have a #show page (only if all SpeakerTalk are hidden)

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 soft delete for talks
2 participants