chrislopresto/ember-freestyle

Simplify Technique for Including Notes

chrislopresto opened this issue · 7 comments

There are three separate, related components for including notes in a Freestyle guide: freestyle-notes, freestyle-note, and freestyle-annotation. This unnecessarily complicated approach is a result of quick prototyping. Let's simplify it.

Hi @chrislopresto

First, love the addon, and awesome EmberConf talk! 😄

To simplify the annotation technique, are you aiming at keeping the components but changing public API, or are you thinking of removing/merging them?

I can see that freestyle-note and freestyle-annotation are used as public components to build the guide but freestyle-notes seems to be used privately to implement freestyle-note.

If this is true, I am wondering if we could try to merge the behavior of freestyle-note and freestyle-annotation into one component.

This component could be either configurable (with positional parameters?) or smart enough to know the type of annotation (markdown or HTML) to produce based on context and/or content.

I know this is pretty vague, I'm going to find some time and try put together a quick PR.
Any comments or pointers as to where you want to go with it would be really helpful

Thanks!
--Miguel

@migbar Thanks and thanks! These are early days, so I think we should remove/merge components to arrive at something simple.

Your outlined approach sounds good at first glance. As we dig in, we should document the purpose and usage guidelines for each of the (hopefully two) components.

As you're able to start digging into this, I will start digging into #48 as it's somewhat related. We may as well aim for one compatible set of breaking changes in an upcoming release.

Awesome!
Let me see if I can carve out some time this week ...

Hi, love freestyle, we use it on every project. This is currently a bit of a pain on our end, people frequently mess up the note slug. Unfortunately, the slug lives on the same level as usage, making it difficult to just implement this using contextual components. What are your guys thoughts on a redesign or iterative change to make this easier to work with? I think it would be nice to have something that just works for the simple use case, but still flexible to provide overrides for other uses that people are also doing.

This would be addressed by #340.

#357 has simplified this somewhat by removing freestyle-note and consolidating on freestyle-annotation. The real fix will be via #340 though.

Can we close this one? I think the original issue (having 3 separate components) is now resolved? I created #613 to completely get rid of the remaining freestyle-note component.