Skip to content

Fix #3415 Layer properties are not accessible if its style is invalid#3719

Merged
tdipisa merged 2 commits intogeosolutions-it:masterfrom
allyoucanmap:layer-error-settings
May 6, 2019
Merged

Fix #3415 Layer properties are not accessible if its style is invalid#3719
tdipisa merged 2 commits intogeosolutions-it:masterfrom
allyoucanmap:layer-error-settings

Conversation

@allyoucanmap
Copy link
Copy Markdown
Contributor

Description

This PR introduces the possibility to access the settings of a layer even if it has error so if a setting causes an error is possible to update it.

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)
#3415

What is the new behavior?
It's possible to access layer properties even if there is an error

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:

@allyoucanmap allyoucanmap added this to the 2019.01.01 milestone May 6, 2019
@ghost ghost assigned allyoucanmap May 6, 2019
@allyoucanmap allyoucanmap requested a review from offtherailz May 6, 2019 09:55
@coveralls
Copy link
Copy Markdown

coveralls commented May 6, 2019

Coverage Status

Coverage increased (+0.02%) to 81.369% when pulling 0ffa12b on allyoucanmap:layer-error-settings into 85a2070 on geosolutions-it:master.

status = selectedLayers.length > 1 & selectedGroups.length === 0 ? 'LAYERS' : status;
status = selectedGroups.length > 1 && !isSingleGroup ? 'GROUPS' : status;
status = this.props.selectedLayers.length > 0 && this.props.selectedLayers.filter(l => l.loadingError === 'Error').length === this.props.selectedLayers.length ? 'LAYERS_LOAD_ERROR' : status;
status = this.props.selectedLayers.length > 0 && this.props.selectedLayers.filter(l => l.loadingError === 'Error').length === this.props.selectedLayers.length ? `${status}_LOAD_ERROR` : status;
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 document getStatus. Is not too much clear what are the possible states of status. Please include all the definitions

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.

I see the fix, but is not clear anymore what are the possible statuses. Please document the getStatus function in order to clarify the possibile return values and their meaning

@tdipisa tdipisa merged commit d3a2a2a 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
…tyle is invalid (geosolutions-it#3719)

* enabled settings on layer with error

* add documentation for get status
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.

Layer properties are not accessible if its style is invalid

4 participants