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

Refactor displayField to displayExpression/mapTipTemplate #1973

Merged
merged 1 commit into from Aug 2, 2016

Conversation

m-kuhn
Copy link
Member

@m-kuhn m-kuhn commented Apr 2, 2015

Previously there was the expressionField (a field name or an expression) mainly
used for the feature list in the form view of the dual view.
On the other hand there was the displayField which could contain either a
simple field name or a complex HTML structure with embedded expressions. And to
know what it was you could compare it's content with the field names, if a
field name matched, you used it as a displayField (original purpose) and if
not... well, you could deal with HTML if you had a use for it.

The main problem is that there are two different usages for this kind of thing

  • plain text identifier (field or expression)
  • pretty, rich text feature info

This commit cleans up with this. You want rich text and a lot of info: go for
the mapTip. You want a plain text string to identify features: go for the
featureTitle.

@3nids
Copy link
Member

3nids commented Apr 2, 2015

good job!

It might be better to move the feature title definition to the field tab? Although, the field tab really need room. Maybe, on the general tab then?

otherwise +1 for merging!

@nyalldawson
Copy link
Collaborator

@m-kuhn any plans to resurrect this?

@m-kuhn
Copy link
Member Author

m-kuhn commented Aug 1, 2016

If it's ever going to happen then during this api break.

Take 2...

Changes compared to before:

  • continue using displayExpression() (instead of featureTitle())
  • property is mapTipTemplate (instead of mapTip())

@m-kuhn m-kuhn changed the title Refactor displayField/expressionField to featureTitle/mapTip Refactor displayField to displayExpression/mapTipTemplate Aug 1, 2016
Previously there was the expressionField (a field name or an expression)
mainly used for the feature list in the form view of the dual view.
On the other hand there was the displayField which could contain either
a simple field name or a complex HTML structure with embedded expressions.
And to know what it was you could compare it's content with the field names, if
a field name matched, you used it as a displayField (original purpose) and
if not... well, you could deal with HTML if you had a use for it.

The main problem is that there are two different usages for this kind of
thing

 * plain text identifier (field or expression)
 * pretty, rich text feature info

This commit cleans up with this. You want rich text and a lot of info:
go for mapTipTemplate.
You want a plain text string to identify features: go for
the displayExpression.
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.

None yet

3 participants