datatlas-erasme / front

🗺 [DEPRECATED] DatAtlas frontend is an interface to create maps with custom data, style and features.
https://github.com/datatlas-erasme/datatlas
6 stars 0 forks source link

feature: implement basic configurable search field #158

Closed lutangar closed 1 year ago

lutangar commented 1 year ago

Contribute to #18

The search field appears when searchFilters are specified in the instance configuration (see README.md).

It's supposes to work whith any number of filters but currently leads to odd results at the moment. This will be tricky to get it working with 0 config... I'll need to discuss this with you guys.

Simulating a click on a feature was a pain ! This was in fact highly coupled to deck-gl and the interface.

There is still an odd bug : If you never hover the map with the mouse cursor the popover won't open when you click on a feature in the search results...

The search field isn't styled and should be styled respectively in each instances.

OlivPi commented 1 year ago

I'll like to discuss about your work to understand it correctly, and help you to find a general solution to fix the bug.

lutangar commented 1 year ago

You place the instance files in the front now ?

This is only for testing purpose so I might ignore them from git :+1:

Pipazoul commented 1 year ago

I've not managed to make it work locally, i've added searchFilters": ["fcbos54dh"], in the instance configuation file on the back but does it appear in any way on the front, Or maybe i should use it trough the console ?

lutangar commented 1 year ago

I've not managed to make it work locally, i've added searchFilters": ["fcbos54dh"], in the instance configuation file on the back but does it appear in any way on the front,

Could you share the content of your instance configuration file and your .env file ? Make sure you're seeing searchFilters": ["fcbos54dh"], in the response to the call to the instance configuration file in the network tab of your browser :

GET /api/conf/instance

I still don't quite get the organisation of some of the component but I initially put the "seach bar" where it was commented before in DesktopPanelControl. This would really benefits from some rework :broom:

...and from what I am seeing now it was only appearing when the theme !=== 'industries so that's probably why you didn't see it in the first place. This part at least should be fixed with last commit.

lutangar commented 1 year ago

It's supposes to work with any number of filters but currently leads to odd results at the moment. This will be tricky to get it working with 0 config... I'll need to discuss this with you guys.

For now, as long as we only search through one field value (ex: name) it's working great. However the algorithm is sub-efficient it has been written to search through many field.

We could either decide :

Either way we could merge this already since this is functional.

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication