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

Adds ExpandableCard State and uses it in TraceOptions #619

Merged

Conversation

eri9000
Copy link
Collaborator

@eri9000 eri9000 commented Oct 22, 2024

Related to issue: kotlin#4797

Summary of changes:

  • Adds a state holder class for Expandable card - this gives the option to manage the state outside or inside the composable.
  • Makes use of this state class in ExpandableCardWithLabel
  • Changes TraceOptions to use the new ExpandableCardWithLabel

Pre-merge Checklist

@eri9000 eri9000 changed the title Adds ExpandableCard State Adds ExpandableCard State and uses it in TraceOptions Oct 22, 2024
@eri9000 eri9000 self-assigned this Oct 23, 2024
@puneet-pdx puneet-pdx self-requested a review October 23, 2024 18:55
Copy link
Collaborator

@puneet-pdx puneet-pdx left a comment

Choose a reason for hiding this comment

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

@eri9000 looks good overall. Some comments. Mostly about changing the padding which is affecting the ResultScreen

Also the PR does not address all the bullet points mentioned in the issue

  • Make the title "Fraction Along" use the tertiary color and be a bit bigger font.
  • Review Spacing between components
  • Anchor Zoom to/ Delete near menu ellipsis
  • Add "Results" to number of feature results

Column(
modifier = Modifier
.fillMaxWidth()
.padding(top = 16.dp)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why are we removing these padding values ?
They are making the result screen look congested.

Before

featureBranch featureBranch

After

featureBranch featureBranch

Also notice that AdvancedOptions is smaller that Feature and FunctionResult Card in the after picture.
It needs to be the same size the ones above it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This will be fixed in a follow up PR.
This padding value will go on the outside composable for TraceResult as a Spacer.

@eri9000 eri9000 requested a review from puneet-pdx October 24, 2024 00:59
Copy link
Collaborator

@puneet-pdx puneet-pdx left a comment

Choose a reason for hiding this comment

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

@eri9000 just a minor comment

@@ -42,6 +42,7 @@
<string name="cancel">Cancel</string>
<string name="clear_all_results_confirmation">All trace results will be lost.</string>
<string name="object_id">Object ID: %s</string>
<string name="selected_icon">Selected Icon</string>
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this should just say selected. As the accessibility will read the component and call it an icon and follow it up with this string.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated ✅

@eri9000 eri9000 merged commit d4c27bf into feature-branches/utilitynetworktrace Oct 24, 2024
@eri9000 eri9000 deleted the Erick/ExpandableCardState_1 branch October 24, 2024 18:00
sorenoid added a commit that referenced this pull request Nov 7, 2024
* Sor10874/un trace tool (#540)

* add UtilityNetwork components and Trace microapp modules

* Upgrades to Kotlin 2.0 and K2 compiler and latest API build (#538)

* barebones

* whitespace

* secrets defaults

* add README and default Modifier parameter. update API file.

* feedback on naming.

* update package name

* use compose compiler plugin

---------

Co-authored-by: Soren Roth <sor10874@esri.com>
Co-authored-by: Erick Lopez Solis <erick_solis@esri.com>

* Barebones implementation (#543)

* Changes to perform Trace with hardcoded inputs

* refactor

* optimize imports

* Initial Implementation of UN Trace tool UI(#544)

* add theming to ExpandableCard (#548)

* add theming to ExpandableCard

* add use of composition local shapes to ExpandableCard header

* feedback

* remove unused typography style. feedback.

* add new configurable styles. make theme internal. other feedback

---------

Co-authored-by: Soren Roth <sor10874@esri.com>

* Utility network trace design state obj (#554)

* Changes to add Trace state

* Strip down implementation

* UN trace tool config UI (#552)

* add theming to ExpandableCard

* wip

* add use of composition local shapes to ExpandableCard header

* wip

* UI standardized and functionally complete.

* bring experimental compose foundation UI into toolkit. Out of experimental in v1.6.6 (compose BOM 2024.08.00), can undo when we rev.

* feedback

* add keys to remember. fix concurrent modification of list.

* remove print statement

* remove print statement

* remove unused typography style. feedback.

* add new configurable styles. make theme internal. other feedback

* comments

* add comments to InternalMutatorMutex

* PR feedback

* whitespace

* fix internal ExpandableCardHeader padding by adding it to the customizable theme.

* center the add new points button

* StartingPointRow -> StartingPoint

* whitespace

---------

Co-authored-by: Soren Roth <sor10874@esri.com>

* update api file (#558)

Co-authored-by: Soren Roth <sor10874@esri.com>

* advanced options ui (#557)

* add theming to ExpandableCard

* wip

* add use of composition local shapes to ExpandableCard header

* wip

* UI standardized and functionally complete.

* bring experimental compose foundation UI into toolkit. Out of experimental in v1.6.6 (compose BOM 2024.08.00), can undo when we rev.

* feedback

* add keys to remember. fix concurrent modification of list.

* remove print statement

* remove print statement

* remove unused typography style. feedback.

* add new configurable styles. make theme internal. other feedback

* comments

* advanced options WIP

* wip

* simple color picker

* advanced options

* feedback

* editable text: add done button to keyboard, clear focus on done.

---------

Co-authored-by: Soren Roth <sor10874@esri.com>

* trace config loading progress indicator

* add UI strings and add utility networks strings.xml to t9nmanifest (#564)

* UN Trace Tool: Adds navigation and AddStartingPoingScreen  (#560)

* UN trace tool compose test framework and cursory test case. (#561)

* UN trace tool compose test framework and cursory test case.

* change name of test to be more descriptive. remove unnecessary annotation.

* use TraceState in tests, not anonymous object

* remove unnecessary function

---------

Co-authored-by: Soren Roth <sor10874@esri.com>

* Sor10874/remove trace state iface (#567)

* Changes to make identify work (#569)

* Changes to make identify work

* remove tappoint, screencoordinates as properties

* optimize imports

* Make the functions suspend

* update padding

* Adds Trace Result screen  (#572)

* Sor10874/real trace configs (#573)

* Changes to make identify work

* remove tappoint, screencoordinates as properties

* save selected trace config in state obj

* optimize imports

* Make the functions suspend

* wip

* support real trace configs and real starting points

* self review. formatting. visibility.

* fix Symbology in composable

PR suggestions

* PR suggestions

---------

Co-authored-by: Puneet Prakash <puneet_prakash@esri.com>
Co-authored-by: Soren Roth <sor10874@esri.com>

* change peek height so cancel starting point button is displayed (#578)

Co-authored-by: Soren Roth <sor10874@esri.com>

* use same instances in saver instantiation as well as restored version of DraggabbleAnchors (#579)

Co-authored-by: Soren Roth <sor10874@esri.com>

* Make sure trace works (#577)

* WIP

* WIP

* WIP

* WIP

* WIP

* update WIP

* WIP

* WIP

* address code review comments

* Trace state initialization (#574)

* WIP

* add functionality to initialize trace state

* WIP

* simplify app logic to initialize the viewmodel
add optimization to the initialize method, to initialize only if state is not already initialized

* WIP

* Revert "simplify app logic to initialize the viewmodel"

This reverts commit 3ed8557.

* update formatting
remove unused flow

* WIP

* initialized traceState in app viewmodel
check if TraceState is already initialized

* address code review comment

* Update api file (#581)

* Associate graphic with Starting points (#585)

* WIP

* associate graphic to each starting point

* stable trace state (#583)

* ensure Trace is skippable and restartable

* encapsulate screen state to function

* annotate TraceState

* remove commented out code

* remove unused parameter

* get rid of extra initial navigation

* dont reinitialize if already initializing or intiialized

* PR feedback

* remove compose compiler reporting

---------

Co-authored-by: Soren Roth <sor10874@esri.com>

* Make sure trace types work (#587)

* WIP

* WIP

* remove check for empty traceResults

* update doc

* Changes to enable/disable Trace button (#588)

* Changes to enable/disable Trace button

* address code review comment

* remove unused import

* redesign trace options (#589)

* redesign trace configuration selecter

* ensure trace option spacing is uniform

* starting points redesign wip

* theme changes to support dark mode and light mode

* remove unused code

---------

Co-authored-by: Soren Roth <sor10874@esri.com>
Co-authored-by: Puneet Prakash <puneet_prakash@esri.com>

* Changes to make advanced options work (#591)

* Changes to make advanced options work

* refactor variable name

* add doc

* Update color selection

* auto populate the tracename, persist zoom to results

* address code review comments

* update cancel button text to use string resource string (#596)

* merge `l10n-staging` to `feature-branches/utilitynetworks` (#594)

* Update pseudo translation - @mit10976 @Isa13169 @nia13404 (#570)

* feat(localization): update pseudo translation (#584)

* Update pseudo translation - @mit10976 @Isa13169 @nia13404

* Update translation - @mit10976 @Isa13169 @nia13404

---------

Co-authored-by: Jonathan Turpin <jturpin@esri.com>

* StartingPoint detail with Slider port. (#592)

* WIP StartingPoint detail with Slider port.

* WIP

* refactor slider code

* update doc

* rename StartingPointDetails -> StartingPointDetailsScreen

* address code review comments

* update package location

* update tracetool unit test

---------

Co-authored-by: Soren Roth <sor10874@esri.com>

* Update slider functions to be internal (#599)

* Add option to navigate to new trace from resultscreen (#597)

* WIP

* reset current trace

* WIP

* update padding values

* remove newline

* address code review comments

* refactor tabrow

* add newline

* address code review comments

* remove explicit name

* remove unused import

* Puneet/4525 multiple results (#601)

* WIP

* reset current trace

* WIP

* update padding values

* remove newline

* WIP

* address code review comments

* refactor tabrow

* add newline

* WIP

* address code review comments

* remove explicit name

* revert changes to compass app

* WIP

* WIP

* WIP

* remove unused import

* address code review comment

* WIP

* remove unused code

* optimize imports

* update currentTrace type

* Utility Trace Tool: Add error reporting  (#600)

* revert change to clear starting points (#609)

* Starting point details screen (#604)

* WIP

* WIP

* add changes to support zoomto, delete and to select terminal

* add newline

* address code review comments

* add padding

* WIP

* address Rama's comments

* address Erick's comments.

* few formatting updates

* fix to have the icon always visible

* Utility Trace Tool: Adds BackHandler actions (#606)

* Make properties internal that don't need to be public (#615)

* Puneet/4521 feature results (#608)

* WIP

* WIP

* WIP

* WIP

* more changes

* remove string

* don't throw exceptions

* add copyright

* update formatting

* fix to show multiple results

* address code review comments

* address comments

* add backhandler

* add string resource

* update indentation

* UN Trace Tool: Fix exceptions thrown when processing selected points (#614)

* Result Screen - Advanced options (#613)

* WIP

* WIP

* WIP

* WIP

* more changes

* remove string

* don't throw exceptions

* add copyright

* update formatting

* WIP

* WIP

* WIP

* WIP

* fix to show multiple results

* address code review comments

* address comments

* add backhandler

* add string resource

* WIP

* update deletion logic

* update logic

* changes for color picker

* refactor colorpicker

* add newline

* Save selected color in options screen

* remove padding changes

* revert changes to navigation

* add copyright

* update indentation

* clear all the starting points

* address code review comments

* address code review comments

* address code review feedback

* Adds ExpandableCard State and uses it in TraceOptions (#619)

* remove redundant navigation route (#625)

* changes to disable the trace button while a trace is in progress (#617)

* WIP

* WIP

* WIP

* WIP

* more changes

* remove string

* don't throw exceptions

* add copyright

* update formatting

* WIP

* WIP

* WIP

* WIP

* fix to show multiple results

* address code review comments

* address comments

* add backhandler

* add string resource

* WIP

* update deletion logic

* update logic

* changes for color picker

* refactor colorpicker

* add newline

* Save selected color in options screen

* remove padding changes

* revert changes to navigation

* add copyright

* update indentation

* clear all the starting points

* changes to disable the trace button while a trace is in progress

* address code review comments

* add progress indicator for add starting point screen

* address code review comments

* address code review feedback

* remove duplicate function

* address code review comment

* address code review comments

* remove task update

* remove redundant setting of _isTaskInProgress

* add content description strings to strings.xml (#623)

* UN Trace Tool: Refactor TabRow (#622)

* Show chevron only when traceResults size is greater than 1 (#632)

* changes to add starting points as features (#621)

* UN Trace Tool: UI Improvements (#626)

* Fix for unchecking the TraceConfiguration in the expandable card once… (#637)

* Fix for unchecking the TraceConfiguration in the expandable card once trace is done

* Sort the trace configurations by name

* fix for refreshing Advanced Options Name field everytime a new TraceConfiguration is selected (#636)

* Update Result screen UI when the First element in the list is getting deleted (#628)

* Update selected state for trace result graphics when 0th element gets deleted

* update delete logic

* address code review comment

* UN Trace Tool: Applies modifier  (#638)

* Highlight feature results (#627)

* WIP

* add feature extent

* WIP

* some refactor

* calculate geometries extent only if currentTraceExtent is null due to no feature extent

* do memory intensive task on Default thread

* group features only when list is not empty

* Adds TraceScaffold composable (#641)

* Add automated test for trace tool (#640)

* UI test changes

* WIP

* add test

* revert unintended changes

* optimize imports

* update formatting

* Update Test

* address code review comment

* update doc

* address code review comments

* Merge v next (#645)

* Upgrades to Kotlin 2.0 and K2 compiler and latest API build (#538)

* Callout: Automated tests (#524)

* L10n staging (#541)

* Update pseudo translation - @mit10976 @Isa13169 @nia13404 (#510)

* Update pseudo translation - @mit10976 @Isa13169 @nia13404 (#511)

* Update translation - @mit10976 @Isa13169 @nia13404 (#536)

---------

Co-authored-by: Jonathan Turpin <jturpin@esri.com>

* Upgrade kotlin and compose compiler plugin version (#555)

* Upgrade Kotlin version

* update ksp version

* Change Design of Dialog Authenticator Catalog (#547)

* Added dialog change

* Added dialog change

* Added dialog change

* Added AlertDialog to ServerTrust Challenge

* Reflected feedback from reviews: Removed unneeded composable components, passed onDismiss instead of authenticatorState, moved some strings to strings.xml, left aligned all fields.

* Reverted to old strings.xml, added padding, add UsernamePasswordAuthenticatorImpl, removed some parameters.

* Fixed hostname, removed unnecessary column composables, fixed Authenticator comments, added back modifier to Authenticator

* Fixed hostname, removed unnecessary column composables, fixed Authenticator comments, added back modifier to Authenticator

* Added modifier back to ServerTrustAuthenticator and UsernamePasswordAuthenticatorImpl

* Removed a modifier line, and added modifier comments in top level comments of API functions

* Added modifier comment in top level, and passed modifier to AuthenticatorDelegate

* Added review feedback, removed some comments, passed modifier to functions

* Fixed mock hostname

* Replaced url with hostname to be tested

* Replaced all instances of original url to hostname for mock testing

* Merge main - 200.6.0 (#568)

* merge `Feature branches/forms` into v.next (#566)

* `Forms`: Add `TextFormElement` (#542)

* `Forms`: Add `TextFormElement` tests (#551)

* add tests

* updated feature form doc

* bump sdk version

* `Forms` : Add SubTypeFeatureLayer support (#559)

* `Forms`: Fix stale `LaunchedEffect`s (#563)

* fix stale launched effects

* use rememberupdatedstate

* update feature form doc (#565)

* Remove unnecessary creating the viewmodel in the main activity (#571)

* don't use trailing lambda to handle onClick in the Compass micro app (#618)

* Merge Feature branches/forms into v.next (#611)

* `Forms`: Add `TextFormElement` (#542)

* `Forms`: Add `TextFormElement` tests (#551)

* add tests

* updated feature form doc

* bump sdk version

* `Forms` : Add SubTypeFeatureLayer support (#559)

* `Forms`: Fix stale `LaunchedEffect`s (#563)

* fix stale launched effects

* use rememberupdatedstate

* update feature form doc (#565)

* show feature edit results related refactor (#575)

* `Forms`:  Show value for out of domain CodedValue types (#582)

* update microapp api usage (#598)

* `Forms` : Barcode support (#593)

* `Forms`: Barcode Scanner Enhancements (#603)

* `Forms` : Add Barcode input tests (#605)

* update test maps (#610)

* `Forms`: Barcode enhancements (#612)

* add tap to focus

* fix #apollo/914

* `Forms` : Update Doc (#616)

* `Forms` : More Barcode Scanner Improvements (#620)

* bump sdk version

* PR feedback

* Upgrade compose bom (#631) (#633)

* upgrade compose bom to 2024.10.00
* remove unneeded test code

---------

Co-authored-by: Erick Lopez Solis <erick_solis@esri.com>
Co-authored-by: Shubham Sharma <shubhamsharma@esri.com>
Co-authored-by: Jonathan Turpin <jturpin@esri.com>
Co-authored-by: Puneet Prakash <puneet_prakash@esri.com>
Co-authored-by: Nour Siwar @ Esri <100004210+NourdotSiwar@users.noreply.github.com>
Co-authored-by: Kaushik Meesala <kaushik.pulagara@gmail.com>
Co-authored-by: Gunther Heppner <gheppner@esri.com>
Co-authored-by: Kaushik Meesala <kmeesala@esri.com>
Co-authored-by: Soren Roth <sor10874@esri.com>

* Merge v next into feature branch (#650)

* Upgrades to Kotlin 2.0 and K2 compiler and latest API build (#538)

* Callout: Automated tests (#524)

* L10n staging (#541)

* Update pseudo translation - @mit10976 @Isa13169 @nia13404 (#510)

* Update pseudo translation - @mit10976 @Isa13169 @nia13404 (#511)

* Update translation - @mit10976 @Isa13169 @nia13404 (#536)

---------

Co-authored-by: Jonathan Turpin <jturpin@esri.com>

* Upgrade kotlin and compose compiler plugin version (#555)

* Upgrade Kotlin version

* update ksp version

* Change Design of Dialog Authenticator Catalog (#547)

* Added dialog change

* Added dialog change

* Added dialog change

* Added AlertDialog to ServerTrust Challenge

* Reflected feedback from reviews: Removed unneeded composable components, passed onDismiss instead of authenticatorState, moved some strings to strings.xml, left aligned all fields.

* Reverted to old strings.xml, added padding, add UsernamePasswordAuthenticatorImpl, removed some parameters.

* Fixed hostname, removed unnecessary column composables, fixed Authenticator comments, added back modifier to Authenticator

* Fixed hostname, removed unnecessary column composables, fixed Authenticator comments, added back modifier to Authenticator

* Added modifier back to ServerTrustAuthenticator and UsernamePasswordAuthenticatorImpl

* Removed a modifier line, and added modifier comments in top level comments of API functions

* Added modifier comment in top level, and passed modifier to AuthenticatorDelegate

* Added review feedback, removed some comments, passed modifier to functions

* Fixed mock hostname

* Replaced url with hostname to be tested

* Replaced all instances of original url to hostname for mock testing

* Merge main - 200.6.0 (#568)

* merge `Feature branches/forms` into v.next (#566)

* `Forms`: Add `TextFormElement` (#542)

* `Forms`: Add `TextFormElement` tests (#551)

* add tests

* updated feature form doc

* bump sdk version

* `Forms` : Add SubTypeFeatureLayer support (#559)

* `Forms`: Fix stale `LaunchedEffect`s (#563)

* fix stale launched effects

* use rememberupdatedstate

* update feature form doc (#565)

* Remove unnecessary creating the viewmodel in the main activity (#571)

* don't use trailing lambda to handle onClick in the Compass micro app (#618)

* Merge Feature branches/forms into v.next (#611)

* `Forms`: Add `TextFormElement` (#542)

* `Forms`: Add `TextFormElement` tests (#551)

* add tests

* updated feature form doc

* bump sdk version

* `Forms` : Add SubTypeFeatureLayer support (#559)

* `Forms`: Fix stale `LaunchedEffect`s (#563)

* fix stale launched effects

* use rememberupdatedstate

* update feature form doc (#565)

* show feature edit results related refactor (#575)

* `Forms`:  Show value for out of domain CodedValue types (#582)

* update microapp api usage (#598)

* `Forms` : Barcode support (#593)

* `Forms`: Barcode Scanner Enhancements (#603)

* `Forms` : Add Barcode input tests (#605)

* update test maps (#610)

* `Forms`: Barcode enhancements (#612)

* add tap to focus

* fix #apollo/914

* `Forms` : Update Doc (#616)

* `Forms` : More Barcode Scanner Improvements (#620)

* bump sdk version

* PR feedback

* Upgrade compose bom (#631) (#633)

* upgrade compose bom to 2024.10.00
* remove unneeded test code

---------

Co-authored-by: Erick Lopez Solis <erick_solis@esri.com>
Co-authored-by: Shubham Sharma <shubhamsharma@esri.com>
Co-authored-by: Jonathan Turpin <jturpin@esri.com>
Co-authored-by: Puneet Prakash <puneet_prakash@esri.com>
Co-authored-by: Nour Siwar @ Esri <100004210+NourdotSiwar@users.noreply.github.com>
Co-authored-by: Kaushik Meesala <kaushik.pulagara@gmail.com>
Co-authored-by: Gunther Heppner <gheppner@esri.com>
Co-authored-by: Kaushik Meesala <kmeesala@esri.com>
Co-authored-by: Soren Roth <sor10874@esri.com>

* Utility Network update api file (#643)

* update api file

* add BuildConfig to api file ignores

---------

Co-authored-by: Soren Roth <sor10874@esri.com>

---------

Co-authored-by: Soren Roth <sor10874@esri.com>
Co-authored-by: Erick Lopez Solis <erick_solis@esri.com>
Co-authored-by: Puneet Prakash <puneet_prakash@esri.com>
Co-authored-by: Jonathan Turpin <jturpin@esri.com>
Co-authored-by: Shubham Sharma <shubhamsharma@esri.com>
Co-authored-by: Nour Siwar @ Esri <100004210+NourdotSiwar@users.noreply.github.com>
Co-authored-by: Kaushik Meesala <kaushik.pulagara@gmail.com>
Co-authored-by: Gunther Heppner <gheppner@esri.com>
Co-authored-by: Kaushik Meesala <kmeesala@esri.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants