noi-techpark / it.bz.opendatahub.epaper.webapp

0 stars 5 forks source link

As a tool user I want to have a place where I can see and define the content to be shown on the display. #41

Closed sseppi closed 2 years ago

sseppi commented 2 years ago

The Content Tab of the detail view of a display must allow the user to either:

The user must have also the possibility to manually send the content to de display and override the schedule defined in the Scheduler tab.

Link to useful APIS:

SaimonasFOS commented 2 years ago

@sseppi @Piiit I have a question regarding integration of Templates for Displays. I see two scenarios how a Template could be applied to a Display:

  1. User selects a Template to be applied for Display, Backend then copies Template information to Display. That means there would be no relation between Displays and Templates and when the Template is modified, the Display image would not change.

  2. Backend sets a relation between Display and Template and when Template is changed, images on all Displays that have the Template assigned to them would change (unless user applies a Template to a Display but then changes background image/fields for that Display only, then the relation between the Display and Template would have to be erased)

For me scenario 1 would be better because it's easier to implement and also with scenario 2 there could be unintended image changes across displays. But maybe scenario 1 doesn't fit the idea of Template usability for you, I'm not sure about this.

Piiit commented 2 years ago

@sseppi @SaimonasFOS I suggest to implement scenario 1 for now, since unattended image changes could be dangerous. I would suggest though, to add a flag to the display dashboard or scheduler, to say "Attention: the next update has a changed template" or something... For the future, I would suggest to ask the user, if he wants to update all displays that use the new template... I could think of a list of displays that used the old template and a checkbox for each and a update button or something, but that would be something for future enhancements.

sseppi commented 2 years ago

@Piiit @SaimonasFOS I have a question, what does happen for a display in front of a Seminar-rom?

In this case tit is foreseen that if here is an event in the room are shown the information about the event that is taking place. In case there is no events it should be displayed a list view with the upcoming events. I suppose that theese are two different templates.

If we choose the solution number 1 does it work?

Piiit commented 2 years ago

Correct, we should not confuse templates with images. The changed template should not trigger any updates on the displays, a display can have multiple templates according to the scheduler. Perfect example by @sseppi ....

At a single point in time the display can have only one image, and that image is made out of a certain template, but that can also be totally transparent to the display itself, because it is just a image that must be shown.

An image is a filled out template at a certain time...

@SaimonasFOS My first comment is not correct therefore, please consider this as final decision...

SaimonasFOS commented 2 years ago

@Piiit @sseppi Okay, but this case is a bit tough for me, since when making the Template system I did not consider this scenario with upcoming event list. It was mentioned in one of the tasks but I kind of forgot about it. I was just focusing on basic template functionality as was described here https://github.com/noi-techpark/it.bz.opendatahub.epaper.webapp/issues/53 . Right now you can have a template with one picture and multiple text fields and a Display can have one template showing at the moment.

What you described here is an alternative scenario - we have to show one template during an event, and then another after the event ends and we are waiting for the next event. But then the Template which would show upcoming events would have to be a "special" one - the back-end should fill the picture with upcoming event list. And also the back-end would have to switch from one template to another depending if there's an event or not.

a display can have multiple templates according to the scheduler.

Right now I'm thinking how this would work. Not sure what "multiple templates" mean in this context. Maybe I'm not grasping the idea of the Scheduler. I thought Scheduler was a place where user can define content for a certain period of time, but it would be manual, we are talking here about an automatic system. It feels like there has to be some sort of flag for display in the database to know if it has to show simple user-defined content with one template or have back-end alternating between upcoming events picture and current event info picture. And when the flag is set, allow user to set two templates for the display (one in case an event is happening, another one for upcoming event list)

But maybe you have a better idea how this workflow would go, this is not an easy task...

My first comment is not correct therefore, please consider this as final decision...

Not sure what the decision is. I feel like scenario 1 still works for this? But my original question feels a bit irrelevant to this now.

Piiit commented 2 years ago

Hi @SaimonasFOS The thing is that a template is not an image...This means, we have a schedule and on that events to be shown for a certain display. These events are shown with images send to the display. Such an image is formed out of a template for example. This is transparent for the display itself, because the download is just the final image, no template associated for now. This would be the desired solution... However, lets step back and lets find what is needed for MVP1 :-)

I think we can focus on images for now, that is a single image from a single template to be filled out at a specific point in time and downloaded by the display. This would basically be scenario 1...

The other (mandatory) part could then be implemented in MVP2... if @sseppi gives green light for that too?