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

Scatter plot: formula lines cannot be edited in some cases #3204

Open
katerina-stepanova opened this issue Dec 19, 2024 · 1 comment
Open
Assignees
Labels
bug Something isn't working NX NIBR-related

Comments

@katerina-stepanova
Copy link
Collaborator

katerina-stepanova commented Dec 19, 2024

v1.22.2

Steps to reproduce:

  1. Add a scatter plot
  2. Open formula lines dialog and add a line
  3. Edit formula: move the 2nd column from the right side of equation to the left side of equation
    E.g. if it was ${Chemical Space Y} = ${Chemical Space X} + 1, change it to ${Chemical Space Y} - ${Chemical Space X} = 1
    Note: at this step the line itself disappears and formula is underlined with thin red line:
image
  1. Click OK
  2. Open formula lines dialog again

Expected results:

  1. Previously added formula line should be editable, even if invalid. Preview should show relevant columns.
  2. Indication of invalid lines should be more clear, ideally it should not be possible to save an invalid configuration.
  3. In this particular case, ${Chemical Space Y} = ${Chemical Space X} + 1 and ${Chemical Space Y} - ${Chemical Space X} = 1 are equivalent, both should be supported.

Actual results: Previously added formula line cannot be edited: right side of the dialog is blank on clicking the line. Also, preview is showing wrong columns.
image
Error:

logger.ts:108 
 end of input expected at 1:43
	packages/$sdk/lib/_internal/js_runtime/lib/js_helper.dart 1772:17  wrapException
	packages/$sdk/lib/_internal/js_runtime/lib/js_helper.dart 1807:25  throwExpression
	packages/petitparser/src/core/contexts/failure.dart 14:13          Failure.value
	packages/d4/src/viewer_base/formula_lines_mixin.dart 89:16         FormulaLineHelper._parseLineFormula
	packages/d4/src/viewer_base/formula_lines_mixin.dart 71:7          FormulaLineHelper.setup
	packages/d4/src/viewer_base/formula_lines_mixin.dart 206:5         FormulaLineHelper.getMeta
	packages/$sdk/lib/_internal/js_runtime/lib/js_helper.dart 1516:16  Primitives.applyFunctionWithPositionalArguments
	packages/$sdk/lib/_internal/js_runtime/lib/js_helper.dart 1489:11  Primitives.applyFunction
	packages/$sdk/lib/js/dart2js/js_dart2js.dart 667:13                _convertDartFunctionFast
	webpack://datagrok-api/src/helpers.ts 101:72                       FormulaLinesHelper.getMeta
	webpack://powerpack/src/dialogs/formula-lines.ts 456:46            getMeta
	webpack://powerpack/src/dialogs/formula-lines.ts 445:26            _createForm
	webpack://powerpack/src/dialogs/formula-lines.ts 996:21            update
	webpack://powerpack/src/dialogs/formula-lines.ts 196:63            _onItemChangedAction
	login.html.js?15582 62:91                                          a.__tryOrUnsub
	login.html.js?15582 60:384                                         a.next
	login.html.js?15582 58:497                                         a._next
	login.html.js?15582 58:168                                         a.next
	login.html.js?15582 39:23                                          d
	webpack://datagrok-api/src/events.ts 39:11                         <fn>
	packages/$sdk/lib/async/zone.dart 1307:16                          _RootZone.runUnaryGuarded
	packages/$sdk/lib/async/stream_impl.dart 330:5                     _BufferingStreamSubscription._sendData
	packages/$sdk/lib/async/stream_impl.dart 257:7                     _BufferingStreamSubscription._add
	packages/$sdk/lib/async/broadcast_stream_controller.dart 387:7     _SyncBroadcastStreamController._sendData.<anonymous function>
	packages/$sdk/lib/async/broadcast_stream_controller.dart 328:9     _BroadcastStreamController._forEachListener
	packages/$sdk/lib/async/broadcast_stream_controller.dart 386:5     _SyncBroadcastStreamController._sendData
	packages/$sdk/lib/async/broadcast_stream_controller.dart 254:5     _BroadcastStreamController.add
	packages/ddt/src/events/event_bus.dart 77:7                        EventBus.fire
	packages/xamgle/src/interop/grok_api.dart 649:64                   _initJsApi.<anonymous function>
	packages/$sdk/lib/_internal/js_runtime/lib/js_helper.dart 1521:16  Primitives.applyFunctionWithPositionalArguments
	packages/$sdk/lib/_internal/js_runtime/lib/js_helper.dart 1489:11  Primitives.applyFunction
	packages/$sdk/lib/js/dart2js/js_dart2js.dart 667:13                _convertDartFunctionFast
	webpack://datagrok-api/src/dataframe.ts 333:32                     set currentRowIdx
	webpack://powerpack/src/dialogs/formula-lines.ts 129:56            currentRowIdx
	webpack://powerpack/src/dialogs/formula-lines.ts 215:12            _currentItemIdx
	webpack://powerpack/src/dialogs/formula-lines.ts 210:31            setFirstItemAsCurrent
@katerina-stepanova katerina-stepanova added the NX NIBR-related label Dec 19, 2024
Copy link
Member

This issue has been mirrored in Jira: https://reddata.atlassian.net/browse/GROK-17282

@skalkin skalkin changed the title Scatter plot formula lines cannot be edited in some cases Scatter plot: formula lines cannot be edited in some cases Dec 19, 2024
@LesiaPavlenko LesiaPavlenko added the bug Something isn't working label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working NX NIBR-related
Projects
None yet
Development

No branches or pull requests

4 participants