Git Product home page Git Product logo

Comments (6)

aaronjudd avatar aaronjudd commented on April 19, 2024

@saarmstrong created https://github.com/ongoworks/reaction-hero for this package.

from reaction.

aaronjudd avatar aaronjudd commented on April 19, 2024

I've been thinking that this should really be more than a "hero" manager. What if we allow admin to use this to add any content, on any page using this basic package. So it's a CMS, embed widgets, html,etc..

Also design wise, I keep thinking of something along the lines of Medium. A floating + sign that you click, choose content type and go. Just brainstorming a rough vision here...

from reaction.

aaronjudd avatar aaronjudd commented on April 19, 2024

Perhaps expanding the scope of this egregiously, here's some thoughts I have extracted from dev chat:

Hero manager, as a content manager:
Where you can add

  • pure image / promo banners,etc
  • text / html - add a pure html blob
  • product - maybe if this weren't a product grid, but some CMS page you could link a product in
  • social block - insert some different kinds of social elements, like a twitter feed monitoring a hashtag

flexible positioning

  • drag anywhere on a screen, save the dom elements into collection, and re-render with UI.insert/Ui.render in place using those stored elements for positioning anywhere on a page.
  • drag sizing of elements.

display logic

  • per tag
  • per product
  • valid date range
  • some other logic rules (is logged in, is returning user, geolocation)

from reaction.

aldeed avatar aldeed commented on April 19, 2024

You're getting at what I was saying about needing a generic API for adding content to different zones on the page. I would suggest a reaction-layout pkg, perhaps, which can expose a generic API that lets packages provide additional DOM elements. I think it would be too difficult to allow pure DOM manipulation. It would be easier to define a few zones on each type of page where dynamic content can be added by packages or by the user.

Flow idea:

  • Similar to "Add Hero" link that appears right now, reaction-layout could display an "Add Page Item" link in each "zone" on each page, when you're an admin.
  • When clicking "Add Page Item", you can choose which type of item. Simple options like HTML snippet or Image from Media library can be built in to reaction-layout. Packages can add their own options, too, so reaction-hero would add a "Hero" type.
  • Once you choose a type of page item to add, it is displayed, and since you are an admin, you can edit it in place.
  • Any items present on the page can be dragged to a different zone on that page, as @aaronjudd suggested.
  • As admin, you also see a form for each item allowing you to set criteria for display (the "display logic" listed by @aaronjudd. Maybe in a popover.

from reaction.

aaronjudd avatar aaronjudd commented on April 19, 2024

Moving reaction-layout discussion to #148

from reaction.

aaronjudd avatar aaronjudd commented on April 19, 2024

Closing, new functionality that is not a hero manager but will fill this role is coming as part of v0.12

from reaction.

Related Issues (20)

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.