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

UI changes corresponding to #1038 #1039

Merged
merged 30 commits into from
Sep 1, 2023
Merged

UI changes corresponding to #1038 #1039

merged 30 commits into from
Sep 1, 2023

Conversation

marcus-oscarsson
Copy link
Member

@marcus-oscarsson marcus-oscarsson commented Aug 29, 2023

Changes to the UI that goes with changes in #1038

  • Updated dependencies
  • Cleanup due to name changes
  • Drawing both horizontal and vertical lines when centering (like before)
  • Added a functionality to "remember" collection parameter (as redux-local-storage was removed)
    (The dialog code will be rewritten and the redux-form dependency removed in a following PR)
  • Making sure chat widget is always displayed on top
  • Fixed minor issue with access to attributes in PopInput

@marcus-oscarsson marcus-oscarsson force-pushed the mo-ui-updates branch 3 times, most recently from 6499d35 to f7d4ff6 Compare August 29, 2023 15:18
return [
makeLine(
10,
height - 10,
scaleLengthX + 10,
height - 10,
'green',
'rgba(0, 255, 255, 1)',
Copy link
Contributor

Choose a reason for hiding this comment

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

Totally ignorant of context here, but it looks like hardcoding rgb values in code, as opposed to using some kind of symbol, This presumably has been considered.

Copy link
Member Author

Choose a reason for hiding this comment

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

green is just an alias in this library (CSS/HTML for a green color) and in this library fabric.js for rgba(0, 255, 0) so there is no difference really. At least with rgb I know more or less which color that is meant :).

Copy link
Member Author

Choose a reason for hiding this comment

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

If you are very interested https://en.wikipedia.org/wiki/Web_colors

Copy link
Contributor

Choose a reason for hiding this comment

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

Cool.

)
.then((response) => response.json())
.then((data) => {
window.open(
Copy link
Member Author

Choose a reason for hiding this comment

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

At the moment one needs to have braggy for this feature, but it could be made configurable if needed

) : null}
</div>
</Draggable>
<div className="chat-widget-dragable">
Copy link
Member Author

@marcus-oscarsson marcus-oscarsson Aug 30, 2023

Choose a reason for hiding this comment

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

Just making sure that the chat widget is displayed on top of "the blocking div (for observer mode)"

@@ -47,12 +47,12 @@ export class TaskItem extends React.Component {

break;
}
case 'XRFScan': {
Copy link
Member Author

Choose a reason for hiding this comment

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

Simply a name change

@@ -225,6 +225,9 @@ export default class DrawGridPlugin {
* @param {float} y - bottom y coordinate of grid, (mouse y position)
*/
update(canvas, x, y) {
this.gridData.screenCoord[0] = this.currentTopLeftX;
Copy link
Member Author

Choose a reason for hiding this comment

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

Making sure that the grid coordinates are not being updated on accidental clicks (after being drawn but not saved)

@@ -266,7 +266,7 @@ export default class SampleControls extends React.Component {
className="bar"
type="range"
id="zoom-control"
min={zoom_motor.limits[0]}
min={zoom_motor.limits[0] - 1}
Copy link
Member Author

@marcus-oscarsson marcus-oscarsson Aug 30, 2023

Choose a reason for hiding this comment

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

Making sure the first zoom level is available index 0 :)

@@ -165,8 +167,12 @@ export default class SampleImage extends React.Component {

onMouseMove(options) {
if (this.props.clickCentring && this.props.clickCentringClicksLeft > 0) {
if (this.centringVerticalLine !== undefined) {
if (
Copy link
Member Author

Choose a reason for hiding this comment

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

Drawing both horizontal and vertical lines (as we used to do)

@@ -15,6 +15,9 @@ import {
FieldsRow,
CollapsableRows,
toFixed,
getLastUsedParameters,
Copy link
Member Author

Choose a reason for hiding this comment

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

Added a simply functionality to "remember" (store dialog values in local storage) as redux-persist was removed. The general plan is to simplify the overall state management and also replace the redux-form based dialogs with something simpler and better maintained. So this local storage solution with getLastUsedParamters is an intermediate solution.

@marcus-oscarsson marcus-oscarsson changed the title [WIP] UI changes corresponding to #1038 UI changes corresponding to #1038 Aug 30, 2023
@rhfogh
Copy link
Contributor

rhfogh commented Aug 30, 2023

I cannot have a meaningful opinion on these changes, so no review from me.

Thanks for the explanatory comments, btw, they are very useful.

@marcus-oscarsson marcus-oscarsson force-pushed the mo-ui-updates branch 2 times, most recently from ed09ae9 to b0587b2 Compare August 31, 2023 07:47
@marcus-oscarsson marcus-oscarsson merged commit 044e10b into develop Sep 1, 2023
8 checks passed
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.

2 participants