Sectional contrast fix: Added bounding box around each traffic icon for greater visibility (e.g., on sectionals)#3
Conversation
…coptor blades to not get clipped as a result), and adjusted shade of green for "low" traffic, both for greater sectional contrast
…ckground (to go with other contrast changes)
…t bounding box, and some comment and form cleanup
…evels") to only 10%, from 20% before, to give sharper contrast on near-flight-level traffic above and below
…ape look less X-Boxy, until a sub is found for it)
…omment of level traffic
…he barb and opacity configurable options (no UI to change at present), and cleaned up several style items (constants, naming, consolidating cache and repaint key, etc.)
…d off upstream, and used a number that is outside the range of the possible values when they are enabled (the first is an optimization, the second a latent bugfix)
…s I did in the demo I am upping the elevation pixels by 1 (less expensive) to achieve a similarly dramatic shadow effect and provide the best contrast "for the (CPU) buck")
…s is completely trivial
|
I am done tweaking this, @apps4av , so you can review and merge when you feel comfortable. |
|
Actually, @apps4av , hold off on this for a bit. I am doing some tests on my phone that are showing a big penalty for the shadow effect--trying to see if it can be reduced, or if we have to go back to another strategy (e.g., the outline and transluscent box this PR started with). |
…al green "Morris Leaf" color)
…efaulted to true) vs. shadow drawing option (defaulted to false), due to both performance (severely more expensive) and contrast
…puted once at instantiation, vs. method that computes it afresh every time (the latter being inefficient, since the fields it is based on are final, not to mention the verbosity and overhead of a method call)
… cherry picked staging lines and it removed it)
…erlay paint if aircraft is flying level); otherwise some comment and format cleanup
…nioned path versions of icons, 2.) added rasterized (pixel) image cache for even greater rendering speed and decreased CPU/GPU load, 3.) comment and style cleanup
…/avaremp into PR_traffic_icons_squashmerge
…llation; some comment changes
…be corrected by new ADSB emitter ID
|
Ok, @apps4av , I am finally done messing with this (per our email discussions). It is ready for your review. |
…n that feature on (or allow users to do so)
| : _aircraftType = _getAircraftIconType(traffic.message.emitter), | ||
| _isAirborne = traffic.message.airborne, | ||
| _flightLevelDiff = _getGrossFlightLevelDiff(traffic.message.altitude), | ||
| _flightLevelDiff = prefAltDiffOpacityGraduation ? _getGrossFlightLevelDiff(traffic.message.altitude) : -999999, |
There was a problem hiding this comment.
I really wish Dart had some of those constants that Java does (Integer.MAX_VALUE) for things like this, but it doesn't (https://stackoverflow.com/questions/32338554/is-there-an-int-infinity-for-dart). So I picked a value that was well out of the range of what that function could return, due to its nature, and hopefully provides some indication it is a default value to populate a final field. But maybe something that might be better served as an explanatory constant as well (say in the Constants.dart file).
Fixes the security audit findings on the v1 Community rules. All changes are rules-only except a small members-screen tweak so that non-members of private groups see a friendly message instead of a raw permission-denied error. Critical / high: - Counter updates now require an exact +/-1 delta and forbid negative values, instead of allowing any signed-in user to set memberCount and postCount to arbitrary numbers (audit #1). Long-term fix is a Cloud Function trigger; documented in the rules file. - All user-writable documents (profile, group, member, post, userGroups index) are now whitelisted on field keys and validated on types, lengths, and enum values, closing latent privilege escalation paths and DoS via oversized documents (audit #2, #4, #8, #12, #13). - Removed the unconstrained isGroupOwner(gid) branch on member create. Owner approvals now flow through update of an existing pending doc, with status pinned to pending -> active and role/joinedAt frozen (audit #3). Medium: - Member rosters are no longer enumerable by strangers. Reads of groups/{gid}/members require self, owner, public visibility, or active membership (audit #6). - Posts are now bounded to 1000 characters at the rule level (audit #7) and to a fixed field whitelist (audit #8). Hardening: - isActiveMember consolidated to a single get() lookup pattern via helper functions (audit #10 partial). - All timestamps validated as `is timestamp`; full server-timestamp enforcement deferred to a future Cloud Function (audit #13). Knowingly not fixed in v1 (documented inline): - Group metadata visibility: the group doc remains readable by any signed-in pilot so the Discover tab can surface private groups by name. Sensitive future fields must live in a separate restricted subcollection (audit #5). - Counter drift under adversarial use: ruled-bounded to +/-1 per call; long-term fix requires Cloud Functions (audit #11). - Owners can technically self-delete their membership through this rule; rules cannot distinguish "owner leaves" from "owner deletes group". The client repository blocks owner-leave at call time (audit #9). Co-authored-by: Cursor <cursoragent@cursor.com>
Added bounding box and numerous other color tweaks for greater sectional contrast. Also various other icon changes after conversations with Zubair.