-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Feature/51 bookmarks widget #200
Conversation
if (!(dnBookmark.thumbnail == null)) { | ||
//ESRI has this as an "object" with url property | ||
let thumbnail = new Object(); | ||
thumbnail.url = dnBookmark.thumbnail; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future, does it make sense to give thumbnails their own class? Other than bookmarks, I would think popups and some other items could use them.
@@ -25,13 +26,15 @@ public class ExpandWidget : Widget | |||
|
|||
/// <summary> | |||
/// Icon font used to style the Expand button when collapsed. | |||
/// Deprecated | |||
/// </summary> | |||
[Parameter] | |||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | |||
public string? CollapseIconClass { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to simply remove these since they are deprecated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, @AndersenBell we should use the C# [Obsolete]
attribute for deprecated properties.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Good job integrating the variety of items that go into implementing each bookmark.
One question about keeping the Deprecated properties.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few odds and ends, clarifying the two samples, adding [Obsolete] to deprecated properties, etc.
|
||
<div class="links-div"> | ||
<a class="btn btn-secondary" target="_blank" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Bookmarks.html">ArcGIS API for JavaScript Reference</a> | ||
<a class="btn btn-primary" target="_blank" href="https://www.arcgis.com/home/item.html?id=70b726074af04a7e9839d8a07f64c039">Bookmarks widget</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The text on this line should say "Hurricanes", i.e., the name of the layer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still need to update the text here.
@@ -25,13 +26,15 @@ public class ExpandWidget : Widget | |||
|
|||
/// <summary> | |||
/// Icon font used to style the Expand button when collapsed. | |||
/// Deprecated | |||
/// </summary> | |||
[Parameter] | |||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | |||
public string? CollapseIconClass { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, @AndersenBell we should use the C# [Obsolete]
attribute for deprecated properties.
<div class="col-12"> | ||
<p>Click on a bookmark to navigate to its location.</p> | ||
<BookmarksWidget /> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this page not finished? Or does the BookmarksWidget really work with no parameters?
{ | ||
<ExpandWidget Position="OverlayPosition.TopRight" Expanded="true" ExpandIcon="refresh" CollapseIcon="submit" > | ||
<BookmarksWidget @ref="_bookmarkWidget" EditingEnabled="true"> | ||
@*<Bookmark Name="InlineExample"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if we moved the inline markup example to the Bookmarks.razor
page?
} | ||
|
||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's one more method I'd like us to get in the habit of overriding, internal override ValidateRequiredChildren()
. In that, you call each "registered" child like Child.ValidateRequiredChildren()
. This is what makes the [RequiredProperty]
attribute work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case, I don't think any of your children have required props, but it's still good if we do this everywhere.
} | ||
|
||
[JsonConverter(typeof(EnumToKebabCaseStringConverter<Mode>))] | ||
public enum Mode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will need an xml doc comment.
|
||
if (!(dnBookmark.thumbnail == null)) { | ||
//ESRI has this as an "object" with url property | ||
let thumbnail = new Object(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be definable as
let thumbnail = {
url: dnBookmark.thumbnail
};
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, I tried that it couldn't find the syntax to get it to work, works now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few odds and ends to wrap up, looking good!
#timeSliderDiv { | ||
width: 300px; | ||
} | ||
</style> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This stuff still seems non-standard for a Blazor page. If we really need these values, they should be in Bookmarks.razor.css
, probably just leftovers from testing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is copied from the ESRI example... so maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you need the line or the <style> tag.
|
||
<div class="links-div"> | ||
<a class="btn btn-secondary" target="_blank" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Bookmarks.html">ArcGIS API for JavaScript Reference</a> | ||
<a class="btn btn-primary" target="_blank" href="https://www.arcgis.com/home/item.html?id=70b726074af04a7e9839d8a07f64c039">Bookmarks widget</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still need to update the text here.
samples/dymaptic.GeoBlazor.Core.Sample.Shared/Pages/Bookmarks.razor
Outdated
Show resolved
Hide resolved
src/dymaptic.GeoBlazor.Core/Components/Widgets/BookmarksWidget.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great. "Effects", "Time" and "Filter" will be nice additions to built out in future iterations.
closes #51
Adds support for the bookmark widget.
Adds missing properties on the Expander widget
Adds deprecated comments to deprecated properties
Adds Widget re-render support