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

CORPORATION: remove TA modals and integrate into sell modal #796

Merged
merged 4 commits into from
Sep 12, 2023
Merged

CORPORATION: remove TA modals and integrate into sell modal #796

merged 4 commits into from
Sep 12, 2023

Conversation

Caldwell-74
Copy link
Contributor

as stated removes the TA modals and integrate the TA toggles into the sell modal

keeping them seperated just means alot more clicks to open and close the modals
combining them just makes sense to have one modal where the selling can be interacted with

for the text i sticked with the usefull pieces from the old, suggestions or later prs to change it up and improve it are appreciated

Copy link
Collaborator

@Snarling Snarling left a comment

Choose a reason for hiding this comment

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

Seems good. Just a minor comment about some import statements

import TextField from "@mui/material/TextField";
import Button from "@mui/material/Button";
import { KEY } from "../../../utils/helpers/keyCodes";

import { Typography, FormControlLabel, Switch, Tooltip } from "@mui/material";
import { Division } from "src/Corporation/Division";
Copy link
Collaborator

Choose a reason for hiding this comment

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

So this doesn't end up causing any issues because it's being imported just as a type, but we actually need to use relative paths for imports. If Division was being imported for runtime use then you would get a build error due to this being an absolute path.

Also when importing a class just to reference its type, it's best practice to do import type and put it above all the regular imports, this makes it clearer what the import dependencies are as far as figuring out circular dependencies. Types can have circular imports and they're fine with that, but runtime imports can sometimes cause issues when there is a circular dependency.

Copy link
Collaborator

Choose a reason for hiding this comment

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

If you use VSCode you can have it automatically do relative paths for things it autosuggests, I didn't know about this for the longest time and was manually converting to relative paths:

File -> Preferences -> Settings -> User or Workspace tab (I have it set for User but Workspace is more correct) -> Filter for "import" -> Select Extensions/Typescript -> set "Import module specifier" for JS and TS to "relative"

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ill keep that in mind thanks!

import { KEY } from "../../../utils/helpers/keyCodes";
import { CityName } from "@enums";
import { Division } from "src/Corporation/Division";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same comment about import statement

@Snarling
Copy link
Collaborator

See the comments for future reference, I am just merging this and I'll make some related import changes afterwards.

@Snarling Snarling merged commit b6eafce into bitburner-official:dev Sep 12, 2023
5 checks passed
@Caldwell-74 Caldwell-74 deleted the remove-TA-modal branch September 12, 2023 10:38
G4mingJon4s pushed a commit to G4mingJon4s/bitburner-src that referenced this pull request Mar 23, 2024
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