Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add time #348

Closed
bamnet opened this Issue · 16 comments

2 participants

@bamnet
Owner

We need a plugin to show the time. The JS is already in place for this, a feed + content just needs to get served.

Default concerto installations need a 'Date & Time' feed which can only be subscribed to, owned by the Admin group.

@augustf augustf was assigned
@bamnet
Owner

@augustf can you setup the feed in the seeds?

@augustf
Owner

What content types would this feed accept?

@bamnet
Owner

'ClientTime'

@bamnet bamnet closed this
@bamnet bamnet reopened this
@bamnet
Owner

Actually, maybe the clock shouldn't be a plugin? We ship most every template with a clock field and I can't think of a great reason why one would want to turn this off and not have a clock in their installation.

@augustf augustf referenced this issue from a commit
@augustf augustf A proper seed for #348 ? bd3bb06
@augustf
Owner

I would say it's small and simple enough to have as a feed in core Concerto. No need for abstraction with no object.

@bamnet bamnet referenced this issue from a commit
@bamnet bamnet Add client time for #348. 370e71a
@bamnet
Owner

Now the trick is to seed the content and it's submission. This needs to happen after we have a user. Thoughts?

time_content = ClientTime.new(:name => "System Time", :duration => 30, :user_id => 1)
Submission.new(:feed_id => time_feed.id, :content_id => time_content.id, :duration => 1, :moderator_id => 1, :moderation_flag => true)
@augustf
Owner

It doesn't make sense to have a user owning the time submission - especially if they end up getting deleted later (something that can and will happen if other admins come along). Perhaps a nil or 0 value for the user that we can handle in the UI?

@bamnet
Owner

I agree, the solution is not a clean one but I don't think we've got a better one without a lot of redesign (Groups owning content?). User 0 breaks rails and user nil breaks validations (easier to work around, but a poor precedent to set).

Longer term I think this won't exist as a content item and will instead be a property or something like that, but that work won't happen for a little while (when we explore different shuffling algorithm selection, field preferences, etc).

@augustf
Owner

Well what would a property/field solution to this look like? If it's along the lines I'm thinking, it could be something we add piecemeal...

@bamnet
Owner

It's a new model that I've been putting off because we lack the right noun.

{field_id, screen_id, properties....}

maybe properties are a config instance where we have many field_configs

@augustf
Owner

Well you have FieldProperties, FieldOptions, etc. Or we could just put more columns on fields if their functionality remains core-oriented (or just put an options column containing a Hash).

@bamnet
Owner

Can't put the columns on fields, they're not joined with screens. I like to minimize our two word names :-)

@augustf
Owner

Sorry - above I meant the subscriptions table. After all, we already have weight (a sorting parameter), so the abstraction gods won't be much more angry...

@bamnet
Owner

Yea, it's plausible for you to have some meta feed that magically gets content initialized but that gets a bit confusing. How do we know the "Date & Time" feed is where the clock should magically appear? We wouldn't want to show the "is_clock_here" check box on every subscription editing area.

@augustf
Owner

Well I would put a this stuff in an options sort of hash and just check for the key when I want a clock or other shuffle/subscription preferences. It seems less than modular to just have weight there and not accommodate other characteristics of a particular feed. But maybe time isn't in that category; I'm not too familiar with how the Date/Time stuff is actually implemented, so maybe that won't work.

@bamnet bamnet was assigned
@augustf
Owner

At the dev meeting, we decided to have a field_options table to deal with this - and other preferences that might come up on a per field/screen basis.

@bamnet bamnet referenced this issue from a commit
@bamnet bamnet Revert "A proper seed for #348 ?"
This reverts commit bd3bb06.
bd16ae2
@bamnet bamnet closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.