Giter Site home page Giter Site logo

Comments (4)

dmolsen avatar dmolsen commented on May 31, 2024

Some questions...

  1. How does this work with Templates and Pages? They get the same header and footer as Atoms, Molecules and Organisms.
  2. How do annotations work in the context of Templates and Pages? They can't just be stacked below all the elements. That's why I implemented the "mobile first demo" style of pop-up.
  3. Does this add padding to a pattern thus negating some of the benefits of the iFrame resizing for testing or determining breakpoints? Or is that even a concern for Atoms, Molecules and Organisms?

Some clarification on what you mean by "so that we can use the same code" would be helpful. Not sure what the goal is. Need to make sure I'm not going too far afield with my implementation. I was sort of hoping on the pattern view we could use the "mobile first demo" style of pop-up for the code view too but if that's out I'll have to rethink some things.

from patternlab-php.

bradfrost avatar bradfrost commented on May 31, 2024

Good questions.

  1. Is it possible to make a distinction between page-level (templates and pages) and non-page-level (organisms, molecules, and atoms) elements? I think including the header and pattern wrapper HTML makes sense for these non-page-level elements, but yeah it doesn't make sense for those to appear on page level stuff.
  2. Annotations will be handled the way it is in the mobile-first demo. The user will click on an annotated element and the annotation will pop up. A phase 2, nice-to-have version of annotations would allow users to view all annotations for all the elements on the page. That will require a bit more thought, but just keep it in mind.
  3. Good call. At first glance, including the padding for non-page-level elements seemed like a nice way to avoid things butting up against the viewport, but yeah that causes problems. That is a legit concern, especially for things like headers and footers, which I've always coded in isolation. The padding would throw things off. Maybe I can remove the padding across the board, and only apply it to the pattern wrapper on the list view.

Some clarification on what you mean by "so that we can use the same code" would be helpful.

Basically, code view and annotation view don't work because they're looking for the contents of sg-pattern-body. By including the wrapper markup, code view and annotation view code works.

I was sort of hoping on the pattern view we could use the "mobile first demo" style of pop-up for the code view too but if that's out I'll have to rethink some things.

We can totally do that instead.

from patternlab-php.

dmolsen avatar dmolsen commented on May 31, 2024

k...

  1. It might be possible. Templates and Pages are rendered out of a different "level" (i.e. they don't have sub-types) so I might be able to use that as a hook. I've been wondering for a while if Templates should be allowed custom headers/footers so maybe this is a chance to try to implement that.
  2. Definitely doable. But, yeah, more thought needed. The core is there... just need to figure out UI.

On the code view/annotation stuff... I'm going to have to rewrite the code view stuff. The jQuery-based hop in styleguide.js from the "viewer" to the frame contents and then using sg-pattern-body is nice/fast but it will puke if someone tries to use Apache-less mode. Security policies can be a bitch. It's why I've done all of the communication between "viewer" and frame contents with postMessage. Hence, annotations-viewer.js and annotations-pattern.js. I know the annotation stuff I have going now doesn't require sg-pattern-body. It's checking for .pattern-list on <body> in the style guide and view all templates.

from patternlab-php.

bradfrost avatar bradfrost commented on May 31, 2024

On the code view/annotation stuff... I'm going to have to rewrite the code view stuff. The jQuery-based hop in styleguide.js from the "viewer" to the frame contents and then using sg-pattern-body is nice/fast but it will puke if someone tries to use Apache-less mode. Security policies can be a bitch. It's why I've done all of the communication between "viewer" and frame contents with postMessage. Hence, annotations-viewer.js and annotations-pattern.js. I know the annotation stuff I have going now doesn't require sg-pattern-body. It's checking for .pattern-list on in the style guide and view all templates.

Do what you gotta do.

from patternlab-php.

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.