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

Document front end coding standards for imports #23

Closed
seancolsen opened this issue Jan 14, 2022 · 5 comments
Closed

Document front end coding standards for imports #23

seancolsen opened this issue Jan 14, 2022 · 5 comments
Labels
restricted: maintainers Only maintainers can resolve this issue stale May be out of date status: ready Ready for implementation type: enhancement New feature or request work: documentation Improvements or additions to documentation work: frontend Related to frontend code in the mathesar_ui directory
Milestone

Comments

@seancolsen
Copy link
Contributor

  • Relative vs absolute
  • When to use aliases
  • @mathesar-component-library vs @mathesar-component-library-dir
  • When to add new code to a index.ts
@seancolsen
Copy link
Contributor Author

Here's a start at some content

Imports

The following rubric helps keep our imports clean and easy to refactor:

  • When possible, import symbols from a high-level index.ts file instead of from more deeply nested files.

    • Good ✅

      import { getTabularContent } from '@mathesar/stores/table-data';
    • Bad ❌

      import { getTabularContent } from '@mathesar/stores/table-data/manager';

I think the rest of the content can probably follow the same pattern.

I'm having trouble writing the rest of it though because I only have a vague sense of the rules. This has come up many times in review of my PRs, so it would be helpful for me to have some documentation like this to follow.

@pavish would you be up for finishing this content?

@kgodey kgodey added restricted: maintainers Only maintainers can resolve this issue status: ready Ready for implementation type: enhancement New feature or request work: documentation Improvements or additions to documentation work: frontend Related to frontend code in the mathesar_ui directory labels Jan 14, 2022
@kgodey kgodey added this to the [07.1] 2022-01 improvements milestone Jan 14, 2022
@pavish pavish self-assigned this Jan 17, 2022
@pavish
Copy link
Member

pavish commented Jan 17, 2022

@seancolsen Yes, I'll come up with the content.

@kgodey kgodey modified the milestones: Cycle 5: First Release, 02. First Release Oct 5, 2022
@kgodey kgodey modified the milestones: 02. First Release, 03. Post-Release Improvements Nov 24, 2022
@kgodey kgodey modified the milestones: 02. Post-Release Improvements, Post-Release Improvements, Backlog Jan 5, 2023
@github-actions
Copy link

This issue has not been updated in 90 days and is being marked as stale.

@github-actions github-actions bot added the stale May be out of date label Jul 24, 2023
@rajatvijay rajatvijay removed the stale May be out of date label Jul 25, 2023
Copy link

This issue has not been updated in 90 days and is being marked as stale.

@github-actions github-actions bot added the stale May be out of date label Feb 10, 2024
@seancolsen
Copy link
Contributor Author

I'm closing this since it's very old.

@seancolsen seancolsen closed this as not planned Won't fix, can't repro, duplicate, stale Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
restricted: maintainers Only maintainers can resolve this issue stale May be out of date status: ready Ready for implementation type: enhancement New feature or request work: documentation Improvements or additions to documentation work: frontend Related to frontend code in the mathesar_ui directory
Projects
No open projects
Development

No branches or pull requests

4 participants