Closed bradfrost closed 10 years ago
Some questions...
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.
Good questions.
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.
k...
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.
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.
We're now wrapping each pattern in the same HTML as PL's list view so that we can use the same code for annotations, code view, and more.
Right now the pattern name isn't being displayed. For the sake of consistency, it would be great to show the pattern name, similar to the list view. If it's not possible, we can simply remove the label.