-
Notifications
You must be signed in to change notification settings - Fork 66
Component to create: callout #15
Comments
I would like to take this one as my next component ;) |
Due to it's characteristics, callout component should have four element directives:
Main directive
Header directive This is just to wrap the header content around proper HTML tags.
Header directive This is just to wrap the main content around proper HTML tags.
Header directive This is just to wrap the actions content around proper HTML tags.
Final notes I think the above is a good starting point, but default component lacks interactivity. Therefore I think it would be good to split this componeny into two phases, similarilu as table component. Second phase would be about introducing following enhacements:
Feedback is highly appreciated. |
👍 I like this |
👍 looks good |
Updated progress on the callout. |
While I agree that we want to not deviate from Fabric's implementation / naming of things, I think in this case what you suggest makes a heck of a lot more sense. I'd name it Random - what do you think about implementing both? Would it be trivial or a lot of work to support either custom attribute & document it for users? Say "we used this because that's what it is, but for those familiar with the fabric css class, you can use this one... but be clear they do the same thing & if there's a conflict, this [x] one takes precedence"? I have no idea if this is introducing a lot of work for you... if so, nix it. In general going forward, we don't want to implement something differently than how the team did it just because we think it could be done better. For instance, they have used jQuery to create some behaviors with their controls... we don't want to change the actual behavior while we're rewriting it in non-jQuery just because a menu should open a different way than they did it (which is also saying "we want our menu to open differently than Office 365"). In a case like that, we would possibly provide a way to change the behavior. |
There is not a lot of logic behind it, so I think supporting both makes a lot of sense. |
If you look at the example at http://dev.office.com/fabric/components/callout it seems like the element wraps actions which explains why it's called actions rather than only separator. |
@waldekmastykarz all other examples have actions as well, but they don't have separator (due to lack of |
Check, I misunderstood it. So what if we could have the directive responsible for rendering the actions div add the |
That also makes a lot of sense, and would not pollute the main directive so much with unnecessary logic. I'll wait a bit for other opinions, but I like that one. |
👍 |
Quick question to everyone: When callout coponent can be closed, a button element with nested icon element is rendered - have a look here Question: should I append this button as plain element - basically appending |
My 2 cents: no dependencies. At this stage, yes, the HTML for the icon inside the callout component is the same as the separate icon. But this may change in the future. E.g. it may require an additional attribute/element/... which only makes sense in the callout. |
My $0.02: I don't think it's bad to depend on other directives in the library that are already there. In fact, I think it's preferred. If things need to be split out later, then that's something that could be addressed. |
@andrewconnell ok, so I'm waiting for the |
Discussion point/advice needed. If you take a look into the specification I made, I came up with three additional directives for header, content and actions. My intention when it comes to usage is something like that: <uif-callout>
<uif-callout-header>Header</uif-callout-header>
<uif-callout-content>Content</uif-callout-content>
<uif-callout-actions>Actions</uif-callout-actions>
</uif-callout> If you have a look into Fabric examples, you will notice that inside the main div there is another div with class main ( That means that using it the way I thought it should be used, would (by default) transclude everything within the I identified potential solutions:
If you have better options, please let me know. |
Hmm. |
I don’t have strong feelings either way, but agree that #2 is slightly better from my POV. |
On Fabric, when callout has this separatot ( |
If these are generic buttons then I'd say that it's the responsibility of the separator to decorate them with specific classes that it requires for proper rendering. Otherwise we would introduce a dependency (even if optional) from buttons to callout which is odd. |
Manually merged. |
Official link to component description & demo: http://dev.office.com/fabric/components/callout
Screenshot of web analytics for the original http://officeuifabric.com site by @andrewconnell. Use this to see what are the most popular components: http://imgur.com/gallery/buUcyQv
The text was updated successfully, but these errors were encountered: