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

Unable to pick a Timestamp column in the GoToRow dialog if the selected row is out of the viewport #1561

Closed
vbabich opened this issue Oct 5, 2023 · 1 comment · Fixed by #1717
Assignees
Labels
bug Something isn't working good first issue Good for newcomers
Milestone

Comments

@vbabich
Copy link
Collaborator

vbabich commented Oct 5, 2023

Description

Attempting to select a Timestamp column throws an error in the browser log and fails to update the column dropdown in the GoToRow dialog if the selected row in the table is out of the viewport.

Steps to reproduce

  1. Open a large table with a Timestamp column, i.e. example A3 from the Real-time table ops notebook:
from deephaven import time_table

from datetime import datetime, timedelta
import random
import string

def random_character() -> str:
    return random.choice(string.ascii_uppercase)

def create_random_table(time_interval, start_time=None):
    """
    Creates a Deephaven table containing rows of random integers from 1 to 99, random
    uppercase characters, and timestamps.

    Parameters:
        time_interval (str||int): Duration string or int representation of the time interval between rows.
        start_time (str||Instant): Optional string or DateTime representation of the start time.
    Returns:
        A Deephaven Table containing the random data.
    """
    table = None
    if start_time is None:
        table = time_table(time_interval)
    else:
        table = time_table(period=time_interval, start_time=start_time)

    return table.update(formulas=["Number = randomInt(1, 100)", "Character = random_character()", "Boolean = randomBool()"])

daily_data_0 = create_random_table(time_interval="PT1M", start_time=datetime.now() - timedelta(hours=240, seconds=2))
  1. Select the first row by clicking on a non-timestamp column, scroll the table to the bottom
  2. Press Cmd+G to open the GoToRow dialog
  3. Select Timestamp in the column selection dropdown

Expected results
The timestamp column is selected

Actual results
Timestamp not selected,
browser log shows an exception:

Uncaught TypeError: Cannot read properties of undefined (reading ‘asDate’)
    at PYt (IrisGridUtils.js:29:16)
    at Ns.convertValueToText (IrisGridUtils.js:801:46)
    at lm.handleGotoValueSelectedColumnNameChanged (IrisGrid.js:2907:32)
    at onChange (GotoRow.js:270:7)
    at Object.YXe (react-dom.production.min.js:52:317)
    at QXe (react-dom.production.min.js:52:471)
    at JXe (react-dom.production.min.js:53:35)
    at dfe (react-dom.production.min.js:100:68)
    at Kke (react-dom.production.min.js:101:380)
    at react-dom.production.min.js:113:65
    at Tke (react-dom.production.min.js:292:189)
    at XXe (react-dom.production.min.js:50:57)
    at Zke (react-dom.production.min.js:105:469)
    at cte (react-dom.production.min.js:75:265)
    at ute (react-dom.production.min.js:74:124)
    at t.unstable_runWithPriority (scheduler.production.min.js:18:343)
    at Nx (react-dom.production.min.js:122:325)
    at Cke (react-dom.production.min.js:292:48)
    at hYe (react-dom.production.min.js:73:352)

Additional details and attachments
If on step 2 I click on the Timestamp column, the GoToRow dialog won't open at all with the same error in the browser log.

Versions

Engine Version: 0.28.0
Web UI Version: 0.47.0
Java Version: 17.0.8.1
Barrage Version: 0.6.0

@vbabich vbabich added bug Something isn't working triage Issue requires triage good first issue Good for newcomers labels Oct 5, 2023
@vbabich vbabich added this to the October 2023 milestone Oct 10, 2023
@vbabich vbabich removed the triage Issue requires triage label Oct 10, 2023
@mofojed mofojed modified the milestones: October 2023, December 2023 Dec 4, 2023
@mofojed
Copy link
Member

mofojed commented Jan 8, 2024

Good first issue for @wusteven815

@mofojed mofojed assigned mofojed and wusteven815 and unassigned mofojed Jan 8, 2024
mofojed pushed a commit that referenced this issue Jan 8, 2024
- Fixes #1561 
- Added the optional chaining operator to prevent an error from being
thrown
mofojed pushed a commit to deephaven/deephaven-core that referenced this issue Jan 17, 2024
# [0.59.0](deephaven/web-client-ui@v0.58.0...v0.59.0) (2024-01-17)


### Bug Fixes

* GoToRow timestamp fails when selected row is out of view ([#1717](deephaven/web-client-ui#1717)) ([9ddc973](deephaven/web-client-ui@9ddc973)), closes [#1561](deephaven/web-client-ui#1561)
* Interface for IrisGridTableModelTemplate.backgroundColorForCell ([#1699](deephaven/web-client-ui#1699)) ([73e1837](deephaven/web-client-ui@73e1837)), closes [#1697](deephaven/web-client-ui#1697)
* Moved logos so they show in production build ([#1713](deephaven/web-client-ui#1713)) ([a3bea73](deephaven/web-client-ui@a3bea73)), closes [#1712](deephaven/web-client-ui#1712)
* re-colorize command codeblocks when theme changes ([#1731](deephaven/web-client-ui#1731)) ([b1e42f5](deephaven/web-client-ui@b1e42f5))
* TimeInput not triggering onChange on incomplete values ([#1711](deephaven/web-client-ui#1711)) ([6894d96](deephaven/web-client-ui@6894d96)), closes [#1710](deephaven/web-client-ui#1710)


### Features

* Action button tooltips ([#1706](deephaven/web-client-ui#1706)) ([bff6bf9](deephaven/web-client-ui@bff6bf9)), closes [#1705](deephaven/web-client-ui#1705)
* Add support for useDeferredApi ([#1725](deephaven/web-client-ui#1725)) ([51ebe1b](deephaven/web-client-ui@51ebe1b))
* Improved preload variable handling ([#1723](deephaven/web-client-ui#1723)) ([ed41c42](deephaven/web-client-ui@ed41c42)), closes [#1695](deephaven/web-client-ui#1695) [#1679](deephaven/web-client-ui#1679)
* NavTabList component ([#1698](deephaven/web-client-ui#1698)) ([96641fb](deephaven/web-client-ui@96641fb))
* Reject promise immediately if var not found ([#1718](deephaven/web-client-ui#1718)) ([43d40bd](deephaven/web-client-ui@43d40bd)), closes [#1701](deephaven/web-client-ui#1701)
* theming tweaks ([#1727](deephaven/web-client-ui#1727)) ([f919a7e](deephaven/web-client-ui@f919a7e))


### BREAKING CHANGES

* - Subclasses of IrisGridTableModelTemplate or it's subclasses that use
backgroundColorForCell may need to update their signature to accept the
theme if they are calling the superclass


Co-authored-by: deephaven-internal <deephaven-internal@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
3 participants