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

Sync fields; Geometry edit updates; Boolean Fields #993

Merged
merged 6 commits into from
Nov 9, 2023

Conversation

dbauszus-glx
Copy link
Member

@dbauszus-glx dbauszus-glx commented Nov 7, 2023

The location.syncFields(fields) will get the values and update entries for the fields argument.

The location.update() and the geometry entry update methods will call the syncFields metthod for their dependents[] fields.

The geometry entry update method will rebuild the remove and rebuild the location viewEntries.

The numeric entry will not format the entry.value but only format the render if the entry is not editable.

The boolean, numeric, and text entries will assign the newValue if rebuild with editing enabled.

The .link-with-img css nesting has been fixed for the lineheight.

The geometry entry method will shortcircuit id not editable with the hideNoEdit flag set in the entry config.

{
 "type": "geometry",
 "field": "geom_p_4326",
 "fieldfx": "ST_AsGeoJSON(geom_p_4326)",
 "edit": {
  "modifyBtnOnly": true
 },
 "hideNoEdit": true,
 "dependents": [
  "pin"
 ]
}

The boolean entry will not return a disabled checkbox but an icon inline with the label if not editable.

@dbauszus-glx dbauszus-glx added Bug A genuine bug. There must be some form of error exception to work with. Feature New feature requests or changes to the behaviour or look of existing application features. Code Issues related to the code structure and performance. labels Nov 7, 2023
@dbauszus-glx dbauszus-glx marked this pull request as ready for review November 7, 2023 13:29
Copy link
Contributor

@simon-leech simon-leech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing this one out -
✅ hideNoEdit works well and is a great user improvement for points where geometry checkbox doesn't do anything
✅dependents are now being updated for geometry editing
✅ dependents are updated for non-geometry editing
✅ boolean fields now show a tick or cross when true or false, and edit still works.

❔ Should null values from the db in integer and numeric types be parsed to a number - at the moment they show as NaN which isn't very good for the user?
❔ Please can you update the Config Docs with the new options?

Copy link

sonarqubecloud bot commented Nov 7, 2023

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 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@dbauszus-glx
Copy link
Member Author

Added to config wiki.
https://github.com/GEOLYTIX/xyz/wiki/Workspace-Configuration#geometry

null or undefined numeric entry.value should not be displayed. i added those to the NaN check in commit.

Copy link
Contributor

@simon-leech simon-leech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @dbauszus-glx working for me - happy with this one!

@dbauszus-glx dbauszus-glx merged commit ae83ebd into GEOLYTIX:main Nov 9, 2023
6 checks passed
@dbauszus-glx dbauszus-glx deleted the sync-fields branch January 29, 2024 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A genuine bug. There must be some form of error exception to work with. Code Issues related to the code structure and performance. Feature New feature requests or changes to the behaviour or look of existing application features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants