-
Notifications
You must be signed in to change notification settings - Fork 16
DM-7964: get period from table/plot #237
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
Conversation
…able and set the period found to the phase folding panel field
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The period is filled correctly, when the highlight in the same table is changed. But when I switch from 'peak_table' tab to 'periodogram' tab, the highlighted period changes, but it's not reflected in the 'Period' input field. You might also want to handle active table changes (TBL_RESULTS_ACTIVE action).
Probably unrelated to this ticket, but I noticed the tab names are not 'human readable'. It would be nicer to see 'Peak Table' and 'Periodogram' instead of 'peak_table' and 'periodogram'
function getPeriodFromTable(tbl_id) { | ||
const tableModel = getTblById(tbl_id); | ||
if (!tableModel || isNil(tableModel.highlightedRow)) return; | ||
if ([PERIODOGRAM].includes(tbl_id)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit confusing, why not tbl_id===PERIODOGRAM? Or you think we'll be adding more elements to this array in future?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right, that can be simplified. Thanks!
@tgoldina I understand the comment about the active_table action to be handled but i have problem to solve it in a easy and quick way now. As the point is already highlighted, there is no action dispatched that let me know "the plot has been clicked (again)" so is actually little bit tricky. Or do i miss something? That would mean also that the period selection is driven by the active table, which i dislike. |
@ejoliet you are the domain expert, you know better. Whatever you decide is fine with me. :) I might have misunderstood, I thought we want period field to be in sync with the highlighted row in peak or periodogram table. If so, we can watch TBL_RESULTS_ACTIVE action as we watch TABLE_HIGHLIGHT action, and get highlighted row with
|
@tgoldina i see the implementation path but i still don't know if it solve the workflow required. I will leave as it is and go back when we decide how to complete the workflow. Thanks for sharing!! |
I've added a saga that will listen to table_highlight on peak and periodogram table. Every time a user click on the plot or table, the saga will get the period out of the table and pre-filled the period input field in phase folded panel.