New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Placeholder JSX control is missing #677

Closed
rgueldenpfennig opened this Issue Jun 28, 2017 · 4 comments

Comments

Projects
None yet
6 participants
@rgueldenpfennig

rgueldenpfennig commented Jun 28, 2017

Category

  • Question
  • Typo
  • Bug
  • Additional article idea

Expected or Desired Behavior

I want to use the Placeholder control from "microsoft/sp-webpart-base".

Observed Behavior

The Placeholder class can not be resolved anymore. Since I updated the Microsoft NPM packages to the latest version (1.1.1) the control seems to be moved to another package or has been removed.

The change log from \node_modules@microsoft\sp-webpart-base\CHANGELOG.md mentions no changes at all:

## 1.1.1
Thu, 08 Jun 2017 19:39:03 GMT

*Changes not tracked*

Steps to Reproduce

Create a new HelloWorld web part with the SharePoint Yeoman template and try to reference and use the Placeholder control.

import { Placeholder } from '@microsoft/sp-webpart-base';

public render(): JSX.Element {
    return (
      <Fabric>                 
              <Placeholder
                  icon={ 'ms-Icon--ThumbnailView' }
                  iconText={ strings.ProductName }
                  description={ strings.GetStarted }
                  buttonLabel={ strings.Configure }
                  onAdd={ this._configureWebPart } />
      </Fabric>
    );
  }

A working Placeholder is used in the React-Todo-Basic exmple:
https://github.com/SharePoint/sp-dev-fx-webparts/blob/644ef15a1131e5ec30e8289b85971cc0576a3e94/samples/react-todo-basic/src/webparts/todo/components/TodoContainer/TodoContainer.tsx

@eoverfield

This comment has been minimized.

Show comment
Hide comment
@eoverfield

eoverfield Jun 29, 2017

I can confirm this issue as well. I dug more into it. In the GA release notes: https://github.com/SharePoint/sp-dev-docs/wiki/Release-Notes-GA, we can see we should work with "@microsoft/sp-webpart-base": "~1.0.0". sp-webpart-base has a placeholder component exported from "./components/placeHolder/".

In the release notes for the Extension Preview: https://github.com/SharePoint/sp-dev-docs/wiki/Release-Notes---Extensions-Dev-Preview-Drop-1, we can now see that we are to use "@microsoft/sp-webpart-base": "~1.1.1". Ok, so we open up the new sp-webpart-base in v1.1.1 and we can see that PlaceHolder is now missing.

Yet if you look in sp-webpart-base then ./components/placeHolder, it seems that placeholder.d.ts is missing while all of the other pieces for PlaceHolder are there.

@patmill What are the chances we can get placeholder.d.ts added back into sp-webpart-base quickly?

If this was intentionally removed from the latest code drop, could I request that the release notes be updated to include what else was removed / changed in webpart-base and other base packages?

eoverfield commented Jun 29, 2017

I can confirm this issue as well. I dug more into it. In the GA release notes: https://github.com/SharePoint/sp-dev-docs/wiki/Release-Notes-GA, we can see we should work with "@microsoft/sp-webpart-base": "~1.0.0". sp-webpart-base has a placeholder component exported from "./components/placeHolder/".

In the release notes for the Extension Preview: https://github.com/SharePoint/sp-dev-docs/wiki/Release-Notes---Extensions-Dev-Preview-Drop-1, we can now see that we are to use "@microsoft/sp-webpart-base": "~1.1.1". Ok, so we open up the new sp-webpart-base in v1.1.1 and we can see that PlaceHolder is now missing.

Yet if you look in sp-webpart-base then ./components/placeHolder, it seems that placeholder.d.ts is missing while all of the other pieces for PlaceHolder are there.

@patmill What are the chances we can get placeholder.d.ts added back into sp-webpart-base quickly?

If this was intentionally removed from the latest code drop, could I request that the release notes be updated to include what else was removed / changed in webpart-base and other base packages?

@patmill

This comment has been minimized.

Show comment
Hide comment
@patmill

patmill Jun 29, 2017

Contributor
Contributor

patmill commented Jun 29, 2017

@eoverfield

This comment has been minimized.

Show comment
Hide comment
@eoverfield

eoverfield Jul 5, 2017

@patmill Thanks for the update, fair enough on the undocumented part, yeah, understandable yet unfortunate. Is there another replacement for similar functionality though? That particular placeholder made it much more simple to create our own custom configuration screen.

@VesaJuvonen should I go back and look at another option for the PnP samples as well?

eoverfield commented Jul 5, 2017

@patmill Thanks for the update, fair enough on the undocumented part, yeah, understandable yet unfortunate. Is there another replacement for similar functionality though? That particular placeholder made it much more simple to create our own custom configuration screen.

@VesaJuvonen should I go back and look at another option for the PnP samples as well?

@VesaJuvonen

This comment has been minimized.

Show comment
Hide comment
@VesaJuvonen

VesaJuvonen Oct 3, 2017

Contributor

Placeholder controls is now available from following open source library, which can be used for getting reusable controls for SPFx solutions - https://github.com/SharePoint/sp-dev-fx-controls-react. Closing this one for now since replacement functionality is available.

Contributor

VesaJuvonen commented Oct 3, 2017

Placeholder controls is now available from following open source library, which can be used for getting reusable controls for SPFx solutions - https://github.com/SharePoint/sp-dev-fx-controls-react. Closing this one for now since replacement functionality is available.

@VesaJuvonen VesaJuvonen closed this Oct 3, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment