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

[PRODX-20593] Add new MCC Connection page #659

Merged
merged 10 commits into from Jan 5, 2022

Conversation

bnalisnikovskiy
Copy link
Contributor

To go to new page do shift+click on SyncPage title.
this is just a mockup. All other logic and connection with other parts will be added in the future tickets

image

@stefcameron stefcameron changed the title PRODX-20593 Add new MCC Connection page [PRODX-20593] Add new MCC Connection page Jan 4, 2022
Copy link
Contributor

@stefcameron stefcameron left a comment

Choose a reason for hiding this comment

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

Could of strings that should be in strings.ts and some thoughts on establishing the SSO connections...

src/renderer/components/CloseButton/CloseButton.js Outdated Show resolved Hide resolved
src/renderer/components/GlobalPage/AddCloudInstance.js Outdated Show resolved Hide resolved
src/renderer/components/GlobalPage/ConnectionBlock.js Outdated Show resolved Hide resolved
@@ -7,7 +7,7 @@ import { ConfigProvider } from '../../store/ConfigProvider';
import { SsoAuthProvider } from '../../store/SsoAuthProvider';
import { ClusterDataProvider } from '../../store/ClusterDataProvider';
import { ClusterActionsProvider } from '../../store/ClusterActionsProvider';
import { lightThemeClassName, lightTheme, darkTheme } from '../theme';
import { lightThemeClassName, lightTheme, darkTheme } from '../theme.js';
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like a "random" IDE settings change to add the ".js" file extension. Those extensions aren't necessary, given the Webpack setup. Would be good to avoid adding it and keep the code consistent -- unless there's a good reason to add it that I'm not thinking of?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, it's me. My IDE (WebStrom from JetBrans) cannot recognize those imports. I mean, if file is .tsx then import without extension doesn't work (in IDE). Probably it tries fo find ts file as well. I didn't find a way to fix that and allow 'mixing' file types fro IDE

Copy link
Contributor

Choose a reason for hiding this comment

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

It's strange that it only updated that specific import, and not all the other ones too, since by this logic, wouldn't they all exhibit the same issue in WebStorm?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I meant that I did that in purpose. Because without file extension variables seem as unused inside their files. IDE just can't 'net' them. Later I'll try to find solution again...
image

Copy link
Contributor

Choose a reason for hiding this comment

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

Strange. Doesn't WebStorm use ESLint (and our specific configuration of it) for linting the code? Seems like it's using its own linter with its own rules. Maybe that's a clue to fixing this.

Copy link
Contributor

Choose a reason for hiding this comment

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

Please try to get this fix, but we won't let it block this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It uses Eslint as well, and have its own internal checks

src/renderer/components/GlobalPage/AddCloudInstance.js Outdated Show resolved Hide resolved
src/renderer/components/GlobalPage/ConnectionBlock.js Outdated Show resolved Hide resolved
src/renderer/components/GlobalPage/SynchronizeBlock.js Outdated Show resolved Hide resolved
@stefcameron
Copy link
Contributor

I understand you're just adding UI and I guess not wanting to connect it to anything just yet, but my concern with the state setter and the hardcoded string is that this creates technical debt that now needs to be tracked somehow and cleaned-up. You know that's the case, but say you're away from work for some reason, and it's Anton that needs to do follow-up work, will he remember all these little details? Will I?

We know we'll need the string, so why not add it now and be done with it? If the string isn't correct, it can be updated later. But at least we won't introduce a hardcoded string in the code we need to remember to fix later.

We know we'll need the event props, so why not add them now (at least the onCancel since that's the one that's needed here)? All it means is that the thing that's rendering AddCloudInstance changes from <AddCloudInstance setShowNewDesign={setShowNewDesign} /> to <AddCloudInstance onCancel={() => setShowNewDesign(false)} /> and we maintain design integrity.

I see these two small things as a way to prevent the accumulation of many small things here and there that could lead to a potentially big problem. Let's keep the code base as clean as possible at all times.

The use of the state providers in the ConnectionBlock is of less concern since that feels more isolated and seems more obvious that it needs to be replaced, even if it wasn't you that did the follow-up work.

@bnalisnikovskiy
Copy link
Contributor Author

bnalisnikovskiy commented Jan 5, 2022

Sure. It's not a big changes. Now I see what you meant. Fixed

@stefcameron
Copy link
Contributor

Sure. It's not a big changes. Now I see what you meant. Fixed

Thank you! 😄

Copy link
Contributor

@stefcameron stefcameron left a comment

Choose a reason for hiding this comment

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

Looks good!

@bnalisnikovskiy bnalisnikovskiy merged commit 1a256b3 into master Jan 5, 2022
@bnalisnikovskiy bnalisnikovskiy deleted the PRODX-20593_Add_AddCloudInstance branch January 5, 2022 17:15
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.

None yet

2 participants