Skip to content

Fix #3712 SLD styles version 1.1.0 are not saved correctly from Style Editor#3718

Merged
tdipisa merged 3 commits intogeosolutions-it:masterfrom
allyoucanmap:sldse-styleeditor
May 6, 2019
Merged

Fix #3712 SLD styles version 1.1.0 are not saved correctly from Style Editor#3718
tdipisa merged 3 commits intogeosolutions-it:masterfrom
allyoucanmap:sldse-styleeditor

Conversation

@allyoucanmap
Copy link
Copy Markdown
Contributor

@allyoucanmap allyoucanmap commented May 6, 2019

Description

This PR introduces following changes to verify version of SLD style is correctly updated in the editing phase.
changes:

  • temporary style will be replaced when style editor switches format
  • Style Editor sends every save POST request with param raw equal true to ensure correct update of the version
  • If SLD changes version, Style Editor sends POST/PUT requests for temporary style with raw equal to true
  • disabled editing for unsupported format (currently it is not possible to edit style such as mbstyle or ysld)

ui with editing disabled
2019-05-06 09_40_44-Window

Issues

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x", remove the others)

  • Bugfix

What is the current behavior? (You can also link to an open issue here)
#3712

What is the new behavior?

  • temporary style will be replaced when style editor switches format
  • Style Editor sends every save POST request with param raw equal true to ensure correct update of the version
  • If SLD changes version, Style Editor sends POST/PUT requests for temporary style with raw equal to true
  • disabled editing for unsupported format

Does this PR introduce a breaking change? (check one with "x", remove the other)

  • No

If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...

Other information:

@ghost ghost assigned allyoucanmap May 6, 2019
@allyoucanmap allyoucanmap added this to the 2019.01.01 milestone May 6, 2019
@coveralls
Copy link
Copy Markdown

coveralls commented May 6, 2019

Coverage Status

Coverage increased (+0.05%) to 81.391% when pulling de4923f on allyoucanmap:sldse-styleeditor into a248afe on geosolutions-it:master.

@allyoucanmap allyoucanmap requested a review from offtherailz May 6, 2019 09:55
Copy link
Copy Markdown
Member

@offtherailz offtherailz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • There is an error when try to select css (with no extension present) and then SLD, you are not able to select SLD style anymore.

@@ -79,14 +81,14 @@ const getStyleCodeObservable = ({status, styleName, baseUrl}) =>
* Observable delete styles.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please clarify that it is a function that returns an observable, and remove Observable from the function name

* silent to false hide notifications
*/
const deleteStyleObservable = ({styleName, baseUrl}, silent) =>
const deleteStyleObservable = ({styleName, baseUrl, observableResponse, observableReject}, silent) =>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename observableResponse and observableReject as onSuccess$ and onError$

@tdipisa tdipisa merged commit e1e1bbe into geosolutions-it:master May 6, 2019
@tdipisa
Copy link
Copy Markdown
Member

tdipisa commented May 6, 2019

@allyoucanmap please provide a backport to 2019.01.xx

allyoucanmap added a commit to allyoucanmap/MapStore2 that referenced this pull request May 6, 2019
…ctly from Style Editor (geosolutions-it#3718)

* add control for sld version 1.1.0 and minor update o style editor

* updated styles epics

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SLD styles version 1.1.0 are not saved correctly from Style Editor

4 participants