DetailsList/GroupedList: Add New Item control between rows
In Modern Sites Microsoft has introduced a new control for easily adding items directly where required. When you hover an area between two existing items it will display a highlighted line with a plus symbol. This is an excellent feature which would be nice to have when adding items to a list.
Today it's available when adding e.g. menu items:

And when adding page content, e.g. webparts:

When rendering lists using the DetailsList or GroupedList components it would be nice to have such a control, configurable to specify e.g. menu items with links/action or a form.
Not 100% sure would belong in Fabric. It's a pretty specific product feature. I'd certainly want to support making this type of experience easy to create, so if there are any blockers to implementing this type of functionality, we'd love to hear what those are.
What I like about the UI Fabric is that it's possible to custom build an application with a relatively small effort and make it look like native SharePoint/O365 meaning users don't have to navigate different UIs. I'm not aware of any specific blockers but I'm also not sure myself how to copy that functionality from what Microsoft created and make it into a reusable component. Assuming this could be done how would I add it to e.g. a GroupedList? I tried adding a control via the onRenderFooter property but I can't get it to render anything. Not working with the example on https://dev.office.com/fabric#/components/groupedlist either as far as I can see.
@micahgodbolt I'm looking at creating this using existing components as far as possible. The IconButton seems to correspond fairly well to the implementation used for adding webparts with at least one important difference: there's an extra div in the "add new web part" menu compared to the IconButton:
Add new web part
<button aria-haspopup="true" aria-label="Add a new web part" class="CanvasToolboxHint is-visible" data-automation-id="toolboxHintButton"><div class="CanvasToolboxHint-plusButtonWrapper"><div class="CanvasToolboxHint-plusButton"><i class="ms-Icon ms-Icon--Add"></i></div></div></button>
IconButton
<button title="Add new" class="root_89ec2ba8 ms-bgColor-themePrimary ms-fontColor-white ms-Button ms-Button--icon root_536d47ae isEnabled_536d47ae" aria-labelledby="5"><div class="ms-Button-flexContainer flexContainer_89ec2ba8"><i class="ms-Icon ms-Icon--Add ms-Button-icon icon_536d47ae"></i></div></button>
The IconButton implementation also seems to come with some default styling. Any idea on how to override that styling with normal/hover behavior?
Ooooh yeah. You can totally override the button styles.
Buttons take a styles object of type IButtonStyles.
Check it out. https://github.com/OfficeDev/office-ui-fabric-react/blob/master/packages/office-ui-fabric-react/src/components/Button/Button.Props.ts#L194
As mentioned I'm just an old-school SharePoint dev so I'm not yet entirely familiar with all these new fancy techniques. :)
What I'm concluding is that the styles property was introduced from v4: https://github.com/OfficeDev/office-ui-fabric-react/releases/tag/office-ui-fabric-react_v4.0.0
When using npm the latest package is v2.34.2 and it's complaining about it's usage with that:
[ts] Property 'styles' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<IconButton> & IButtonProps & { children?: ReactNod...'.
Can/should I use v4 and upwards? If not using npm then how would I add it to my project? We're nowhere near release but we are in development and I'm not sure I want to base current development on pre-release features.
Also, when I browse the releases tag on github all releases are marked as pre-release, including v2.34.2:

Can you clarify what the latest official release supported on SPO would be?
And finally a bonus question: according to the BESTPRACTICES.md document we should use @autobind and avoid binds in templates. I see a lot of binds throughout UI Fabric, e.g. in TodoForm.tsx:
export default class TodoForm extends React.Component<ITodoFormProps, ITodoFormState> {
private _textField: TextField;
constructor(props: ITodoFormProps) {
super(props);
this._onSubmit = this._onSubmit.bind(this);
this._onBeforeTextFieldChange = this._onBeforeTextFieldChange.bind(this);
this.state = {
inputValue: '',
errorMessage: ''
};
}
For my understanding, should these not be removed? I can understand if they were present prior to @autobind being introduced, I just want to confirm if I'm understanding it correctly.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions to Fabric React!
Hi @thomas-bak, is this still an issue?
This issue has been automatically marked as stale because it has not activity for 60 days. It will be closed if no further activity occurs within 14 days of this comment. Thank you for your contributions to Fabric React! Why am I receiving this notification?
This issue has been automatically closed because it has not had recent activity after being marked as stale. If you belive this issue is still a problem or should be reopened, please reopen it! Thank you for your contributions to Fabric React! Why am I receiving this notification?