Skip to content
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

Update docs for Placeholder with an example to hide it in read mode #1280

Closed
1 of 3 tasks
Jwaegebaert opened this issue Aug 11, 2022 · 4 comments
Closed
1 of 3 tasks
Assignees
Labels
area:documentation status:fixed-next-drop Issue will be fixed in upcoming release.
Milestone

Comments

@Jwaegebaert
Copy link
Contributor

Jwaegebaert commented Aug 11, 2022

Category

  • Enhancement
  • Bug
  • Question

Version

Please specify what version of the library you are using: Latest

Update

The feature request is a bit to verbose to implement within the control itself. To compensate, we will update the docs with an example how this can be achieved.

{
  this.displayMode === DisplayMode.Edit ?
  <Placeholder ...placeholderProps /> :
  <div />  
}

More info: #1295 (comment)

Question

Extending the control Placeholder with an extra option that would hide the control when the display mode of the page is in Read. This way users could use the control and configure it so the look and feel is similar like a default SP WebPart. For example: When you use the conversations WebPart from Yammer you get the following UI in edit mode.

afbeelding

But if you don't configure the WebPart and publish the page, the placeholder is hidden.

afbeelding

Implementation

This could be achieved by adding a new variable to the interface IPlaceholderProps that looks a bit like the following.

/**
 * Specify if you want to hide the placeholder when the page is in view mode
 */
hideViewMode?: boolean;
@ghost
Copy link

ghost commented Aug 11, 2022

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

@ghost ghost added the Needs: Triage 🔍 label Aug 11, 2022
@Jwaegebaert
Copy link
Contributor Author

If everyone agrees that this could be a nice enhancement, then I can take it up. 😄

@github-actions
Copy link

Thank you for submitting your first issue to this project.

@joelfmrodrigues
Copy link
Collaborator

Hi @Jwaegebaert sorry for the late reply. Enhancements are always welcome 🙂
As you have volunteered to implement it, I will assign this item to you. Thanks!

@joelfmrodrigues joelfmrodrigues added area:new-control status:working-on-it Known issue / feature being addressed. Will use other "status:*" labels & comments for more detail. and removed Needs: Triage 🔍 labels Aug 21, 2022
@Jwaegebaert Jwaegebaert changed the title Extend Placeholder with option to hide it in read mode Update docs for Placeholder with an example to hide it in read mode Sep 21, 2022
joelfmrodrigues added a commit that referenced this issue Sep 22, 2022
Placeholder example to only display in edit mode. Closes #1280
@joelfmrodrigues joelfmrodrigues added area:documentation status:fixed-next-drop Issue will be fixed in upcoming release. and removed area:new-control status:working-on-it Known issue / feature being addressed. Will use other "status:*" labels & comments for more detail. labels Sep 22, 2022
@joelfmrodrigues joelfmrodrigues added this to the 3.11.0 milestone Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:documentation status:fixed-next-drop Issue will be fixed in upcoming release.
Projects
None yet
Development

No branches or pull requests

2 participants