Closed exwhyz closed 2 years ago
Hi,
yes, the plan is to support Form Layouts as well (Header, Body, Footer). However, there are some things which make it difficult for now.
The OOB column and view formatting editing experience is currently based on the vscode editor (when you edit column or view JSON you have line numbers on the left, color highlighting, search & replace functionality, etc.). All of this is possible thanks to the vscode-like editor, which MSFT integrated to the Column\View formatting experience. sp-formatter
uses mentioned OOB vscode editor and applies "enhancements" on top of it.
The problem is, that the Form Layouts do not use vscode editor. It means, that I have to embed the vscode editor into the extension and use two different builds - one for the Form Layouts and another one for the old good Column\View formatting (which makes sp-formatter
build more complicated). Also, I have to write completely different code for the Form Layouts - which includes React event hacks and HTML DOM manipulations (which is a lot more difficult than in the current sp-formatter
implementation). Finally, when Form Layouts receives an update with the OOB vscode editor, I will have to re-write a good piece of code from scratch to support the OOB vscode editor. I just don't want to do an extra job twice (mostly because it's not that trivial).
Thus my plan was to wait until the Form Layouts receives the vscode editor update and then implement sp-formatter
for the Form Layouts. From what I see the Form Layouts still use the plain HTML input component and I don't see anything in the roadmap for this feature. Anyway, I will try to figure out what is the future for the Form Layouts and vscode editor integration and come back with the answer later.
JFYI It looks like there are no immediate plans to add rich json editing support for header/footer from the MSFT side. In the nearest days, I will take a look at what will be the scope of work to add it to the SP Formatter.
FYI - the latest 0.1.0 version supports Form Layouts! It's published and available in the Chrome extensions store but still in the review for Edge (for Edge it takes longer, up to 10 days until it will be publicly available). Please try it and report issues, if any.
I've tried the new version in both Edge and Chrome but cannot get it to work. Are there any particular settings/steps I need to take?
Yeah, something went wrong here, most likely due to some updates for SharePoint. Will take a look.
Microsoft applied "css classes refactoring" which obviously broke form formatter. I fixed the issue and published it to both extension stores. Usually, it takes up to a few days until the update will be validated and become publicly available. I will notify when it's ready.
It's in the Chrome store already. Just make sure the version is 0.1.1. Now it works again as expected, will be available for Edge in a few days. I'll close the issue, please open it in case something is still wrong.
Nicely handled, thank you.
Any plans to extend this to edit/configure Form Layouts? Since Form Layouts break out the Header, Body and Footer JSON, not sure if there are any plans to support this in the future.