-
Notifications
You must be signed in to change notification settings - Fork 376
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
Compare #5529
base: main
Are you sure you want to change the base?
Conversation
This prevents the notification from being added to the DOM when not needed which resulted in the page scrolling and showing a white space at the bottom.
@@ -74,7 +76,7 @@ export default class TimelineStack { | |||
}); | |||
} | |||
|
|||
destroy() { | |||
deactivate() { | |||
if (this._disposeClockAutorun) { |
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.
TimelineStack
has a reaction that keeps the time of workbench items in sync with the timeline clock. Previously this reaction was created inside the constructor, so it kept running even when the Timeline.jsx
component is unmounted/hidden. As a result when the user sets a date for an item, the reaction will override it with the current clock time. I have moved the reaction to a an activate
method which gets called in the componentDidMount method of Timeline.jsx
and created a deactivate
method that gets called in unmount hook. So now, if the Timeline.jsx
is not shown, the user can set dates on item without it being reset by this reaction.
lib/Models/Workbench.ts
Outdated
public async add( | ||
item: BaseModel | BaseModel[], | ||
index: number = 0 | ||
): Promise<void> { |
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.
Added index parameter to specify the position in the workbench where we want to insert the item.
lib/Models/Workbench.ts
Outdated
return; | ||
} | ||
|
||
this.insertItem(item); | ||
|
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.
Moved this call to later, because if the item is a reference, we need to load it first.
@@ -77,4 +78,4 @@ const BottomDock = observer( | |||
}) | |||
); | |||
|
|||
module.exports = measureElement(BottomDock, false); | |||
module.exports = withControlledVisibility(measureElement(BottomDock, false)); |
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.
So that we can show/hide the BottomDock
@@ -16,9 +16,9 @@ import { | |||
ObjectifiedYears |
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.
Changes to make the DateTimePicker more customizable... Ideally, when we have more time, we should rewrite this component.
… compare workflow (not when restoring workflow from share).
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.
Hi @na9da I have just a small suggestion regarding the checkbox component
top: 0.125em; | ||
align-self: flex-start; | ||
position: relative; |
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 added with an intention to force a checkbox aligned with a top row with multi-row label.
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.
lib/ReactViews/Compare/ItemList.tsx
Outdated
<Checkbox | ||
isChecked={item.show} | ||
onChange={ev => onChangeSelection(item, ev.target.checked)} | ||
label={<SelectorText medium>{item.name}</SelectorText>} | ||
/> |
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.
Font size should be set on the top checkbox element and text should inherit it that way we get text and checkbox icon to have the same size and they are aligned vertically.
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.
There are some changes to how the checkbox work in #5826 which enables us to easier work with text sizing.
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.
@na9da We completely remove the existing compare tool from the navigation menu? I am not a fan of doing that, it will be really hard to communicate that to our users. Is there a chance to leave it but make it hidden by default, at first I understood that both options will be available and that this will be marked as experimental? |
hi @zoran995 the changes are following testing we've done with users which were very confused by the current workflow. Understandably, this is a major and we'd like to test it again before it's merged into main. We'll definitely keep you in the loop. and we'll talk about options. |
@zoran995 thanks for pointing out other use cases. This PR is still a WIP and I hope we will be able to address all the concerns. I'll add back the experimental flag if we merge it anytime soon. |
What this PR does
Implements new compare workflow.
Other changes
ignoreSplitterWhenPicking
option to MapInteractionMode. This is needed so that when user picks a filter location on the left or right and only one side has visible imagery, the interaction should still resolve the location correctly. cbf8317Timeline.jsx
component mounts or unmounts.index
parameter toWorkbench.add()
method specifying the index where the item should be added -terriajs/lib/Models/Workbench.ts
Line 171 in 4f925bc
Description
#useExperimentalCompareWorkflow
hash parameter to enable this feature.Testing
Checklist