Hi Fawad, all,

I have fixed the errors you mentioned. It appears one of the variables had a 
bad name which was causing the error.
The error does not show anymore indeed on my end, thanks.

On the UI side, possibly as a consequence, I can't see a list of results anymore, and the search widget state is not restored.

The list of results is just fine on my end, I am not sure what could be wrong.

In the meantime, I figured out that the list shows up indeed when issuing a query in the 
search input, cool. However, as a user I would expect the list to be present also when 
the search input is empty, with the possibility to reduce the list by hitting the link 
"Show result items", what do you think? Speaking of the list, that'd be great 
imho that the popups can be displayed while the list is active, so that the user can 
browse content via the list, wouldn't it? This should not prevent us from release version 
1.0 though.

About the map state, it does not work well with facets. Since facets have a 
separate code we cannot apply custom code when a facet is selected thus 
limiting our ability to pass the map state through js. I tried looking around 
for related js events but could not find one through which we can pass the map 
state after a facet is clicked. Do you have anything in mind for this?

Actually, with the new version, the facet state is restored as I would expect 
it, sorry for the confusion. Restoring the full screen is working in most 
cases, that's cool, however if I run a search, then enter full screen, then 
refine the search, it seems that the full screen state is not preserved, is it?

A note about demos: as far as I can see, the museum map demo does not showcase the 
"country" facet by default, don't you think that'd be worth adding it so that 
the user has a simple demo with facets working with custom fields?

I think the name "Maps.Code.Leaflet" might be misleading for potential developers: this could mean this page is providing Leaflet, while it does not. I would suggest to choose a name that is closer to what the JavaScript really provides, from a functional point of view, what do you think?

I think its fine as is. Since it is placed inside the Code space, the 
developers will immediately be able to know that all the Leaflet related code 
resides inside it. But to be on the safe side, we can rename it to LeafletMap 
as in the macro-map.

I agree LeafletMap would be closer to what it does, but contrarily to the Macro 
Map, if I'm not mistaken, the page currently named Maps.Code.Leaflet does not 
create a JavaScript LeafletMap class, so technically it's more a LeafletUtils 
than a LeafletMap, isn't it? I acknowledge I'm picky with names... I noticed 
that leaflet-main requires leaflet-commons but I'm actually wondering how to 
make sure that leaflet-commons is known from RequireJS before leaflet-main gets 
loaded. I have not faced any error in practice, but I'm wondering if you 
tackled the issue already or if we need to figure it out.

    Ludovic just suggested an improvement (for the next versions): let the user 
configure which existing field could be used in an existing class for 
retrieving geographical information, that could be interesting indeed, to be 
discussed. The calendar application works this way already as far as I 
understood: it lets the user define the date / time field to be used.


Thanks Ludovic for your suggestion. I would look into the calendar application 
to have a better understanding of this and let you know my thoughts.

Ok cool.

Cheers

Stéphane


Best,
Fawad


On Wed, Jul 10, 2019 at 2:55 PM Stéphane Laurière <slauri...@xwiki.com 
<mailto:slauri...@xwiki.com>> wrote:

    Hi Fawad,

    Good to hear from you again, I hope things are fine on your end as well. 
Thanks for the update. Sorry for the delay, we were traveling yesterday. 
Releasing the application soon sounds good. I'm facing a few issues though, 
they may be related to an installation issue on my side, not sure. I grabbed 
the latest code and imported as a XAR over the existing pages in my 11.x wiki 
without error, and I notice the following (I'll consider posting some Jira 
issues if needed):

    - catalina.out errors (not sure if they were present with previous version):

    2019-07-10 11:34:30,349 
[http://ako:8090/xwiki-11.2/wiki/abraca/jsx/Maps/Code/Leaflet?language=en&docVersion=5.1]
 WARN  c.x.x.w.s.JsExtension          - Error at line 203, column 85: missing 
variable name. Caused by: [      var index = 0, lat = 0, lng = 0, coordinates = [], 
shift = 0, result = 0, byte = null, latitude_change, longitude_change, factor = 
Math.pow(10, Number.isInteger(precision) ? precision : 5);]
    2019-07-10 11:34:30,350 
[http://ako:8090/xwiki-11.2/wiki/abraca/jsx/Maps/Code/Leaflet?language=en&docVersion=5.1]
 WARN  c.x.x.w.s.JsExtension          - Error at line 206, column 13: identifier is 
a reserved word. Caused [...]
    2019-07-10 11:35:02,841 
[http://ako:8090/xwiki-11.2/wiki/abraca/jsx/Maps/Code/Leaflet?language=en&docVersion=5.1]
 ERROR c.x.x.w.s.JsExtension          - Runtime error minimizing JSX object: 
Compilation produced 8 syntax errors.
    2019-07-10 11:35:02,841 
[http://ako:8090/xwiki-11.2/wiki/abraca/jsx/Maps/Code/Leaflet?language=en&docVersion=5.1]
 WARN  c.x.x.w.s.JsExtension          - Failed to compress JS extension: null

    - On the UI side, possibly as a consequence, I can't see a list of results 
anymore, and the search widget state is not restored.

    - I notice there is no default radio button checked in the search form: I think either 
"location" or "item" should be checked, to let the user know what's the default (I'd say 
"item").

    - I think the name "Maps.Code.Leaflet" might be misleading for potential 
developers: this could mean this page is providing Leaflet, while it does not. I would 
suggest to choose a name that is closer to what the JavaScript really provides, from a 
functional point of view, what do you think?

    - Ludovic just suggested an improvement (for the next versions): let the 
user configure which existing field could be used in an existing class for 
retrieving geographical information, that could be interesting indeed, to be 
discussed. The calendar application works this way already as far as I 
understood: it lets the user define the date / time field to be used.

    Cheers

    Stéphane


    Fawad Ali:
     > Hi all,
     > Hope everyone is well.
     >
     > Please review the application developed so far. I have included a UI 
test and map states. I think we should release the application as soon as we can 
so that user reviews can be gathered.
     >
     > Best,
     > Fawad



--
Stéphane Laurière
XWiki – https://xwiki.com

Reply via email to