Giter VIP home page Giter VIP logo

liveblog's People

Contributors

alexpott avatar chipway avatar chrfritsch avatar fago avatar georgatgalaniprojects avatar mbm80 avatar milkovsky avatar mtodor avatar ol0lll avatar tjwelde avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

liveblog's Issues

(KUR-35) Thunder Liveblogging: Configure backend for administrator

  • Create administration forms for the custom entities (fields, display, CRUD for liveblog nodes, RUD for posts).
  • Create administration views:
    • List all blogs, posts.
    • Add tab on the blog to list related posts, with edit and delete options.
  • Configure permissions.
  • Create administration links, tabs in admin menu.
  • The posts adding/editing will be done at the frontend Drupal theme.

(KUR-36) Thunder Liveblogging: Integrate the frontend library with Drupal

The javascript library will be a part of the Drupal Module:

  • Timo needs to define paths of assets to load (readily built) and how to instantiate it. (frontend)
  • It will be loaded via the regular Drupal library system.
  • Attach the js,css files while the “Liveblog” rendering as a Drupal library. All the assets will be added as ajax commands to the JSON output.

(KUR-41) Thunder Liveblogging: Post creation / editing form

Post create form:

  • Form will be displayed on the liveblog page on top of all posts.
  • Form will be loaded by Drupal and use Drupal ajax submission.
  • Form has all the post’s fields + 2 buttons: preview, submit.
  • Post preview click:
    • Ajax request to Drupal to preview a post. Drupal renders preview via Drupal ajax.
    • No instant preview is supported right now.
    • For the MVP, just rely on the preview button. Paragraphs already have a preview in the form.
  • Post submit click:
    • Drupal creates a post via ajax.
    • Show success message.
    • The new post will appear automatically as a Pusher notification (Will be implemented in KUR-29).

Post edit form:

  • A separate API endpoint is created to get the edit form HTML by post ID.
  • When editor clicks the “edit” link on the post, edit form replaces the post (frontend part).
  • Form is pre-populated with post fields.
  • Post preview click:
    • Preview should work the same way as for the “Post create form”.
  • Post submit click:
    • Ajax callback
    • Post will be updated.
    • Post edit form will be replaced with an HTML of an updated post via a Drupal ajax command. The frontend needs to implement the suiting ajax command for that.

When the editor deletes a post:

  • Confirmation message is shown(frontend)
  • Post deletion request in ajax (frontend)
  • Post is removed from timeline (frontend)
  • No pusher notification is sent.

(KUR-38) Thunder Liveblogging: Endpoints to fetch posts

Return post HTML by id

  • Returns JSON with rendered html.
  • Will initially return basic HTML, proper rendering will be done in KUR-25.
  • Will be needed after edit a post.

Fetch posts (possible solution: views + serialization + filters + paging)

  • Will return basic HTML, proper rendering will be done in KUR-25.
  • Loads a certain amount of posts(as a JSON with rendered HTML) after a certain timestamp.

Setup permissions, access for posts.

  • MVP: Default to editing permissions of the live blog. If so you are allowed to to edit the posts.
  • Permissions are the same for all posts of a liveblog: Edit, view, delete, create posts. Means: Other editors can also edit your posts

Add a liveblog_example module

It would be better to separate the code from the configuration.

Please move all the files from config/install besides liveblog.liveblog_post.settings.yml in a dedicated liveblog_example module.

(KUR-33) Thunder Liveblogging: Paragragh integration

Integration with paragraph (optional module):

  • Paragraph integration as an additional module // see existing paragraph integrations in Thunder.
  • The module adds an additional field for embedding media links (twitter, youtube, etc.) to liveblog posts.
  • Only 1 value should be possible: either twitter or youtube, or etc.

(KUR-32) Thunder Liveblogging: Create basic Liveblog entities

Create entities: Liveblog(node), Liveblog Post.
Enable default Drupal UI with CRUD forms.
Liveblog is created separately and can afterwards be referenced in the article.

Create entities:
Highlights (taxonomy)

  • Name
    Liveblog fields (node type):
  • Title
  • Body - CKEditor
  • Status. // An Indicator, if Liveblog is actually “live”, or already finished. We should NOT update live status via pusher.
  • Highlights (term reference, multi-valued)
    • configuration for liveblog, contains highlighted options in a textarea.
    • Editor can choose while creating/editing a Liveblog.
      Liveblog Post fields (custom entity):
  • Title
  • Body - CKEditor
  • Created Date
  • Changed
  • Author
  • Location (Google maps link) // check google maps integration modules.
  • Source (Quelle) // Link / Text.
  • Status // Whether post is published
  • Highlight (text field)
    • Text field, bus shows a select widget. Options are at liveblog. Adds the possibility to mark an entry as a highlight (e.g., goal, penalty, red card or more general like “all flights cancelled”) - adds icon.
    • On the liveblog post form we show a select list with the list of selected terms in liveblog.
    • The term is saved as a text machine name compatible with css class name.
    • In KUR-25 every highlight will be rendered as a CSS class, so developers can add an icon for it.
  • Entityreference to Liveblog.

(KUR-44) Thunder Liveblogging: Implement notifications via the pusher API

Configure ws server on pusher.com.
Integrate ws server as a pluggable notification channel.

  • Add a setting for a notification channel plugin.
  • We should load correct js files(library). Frontend will be also pluggable.
  • Provide a default notification channel plugin
  • Reloads page after a while in frontend.(frontend)

Create a pusher plugin

  • Implement notifications via the pusher API.

We do not spread edit, delete events, only new posts.

(KUR-42) Thunder Liveblogging: Post templates

Render posts with a proper HTML

  • Add a display mode, template.

Posts list by Timo:

  • Posts are listed below the form(frontend)
  • Lazy load more posts on scrolling(frontend)
  • Show edit/delete buttons for editor(frontend)

Pusher: No error shown on size limit

Taken from: BurdaMagazinOrg/thunder-distribution#261 (review)
When I make big post (>10kb), limit for Pusher is 10kb, error occurs in log, that it can't be pushed.
But in live blog form I get success message: "Liveblog post was successfully created."
In log: "Failed to send a message to Pusher. See the request log..."
And also, since it's not pushed to pusher, user does not see post until page is reloaded.
-> maybe it should be considered to notify editor about error occurred. Best would be to not create post in Drupal, if it's not pushed to pusher. In general this should be atomic action, so post is successfully created only if it's created properly in both places -> Pusher + Drupal.

Pusher config validation

The Pusher config should be validated by the pusher service.

We should try to make a request and see, if it returns 200

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.