Skip to content

Conversation

@dannon
Copy link
Member

@dannon dannon commented Oct 29, 2025

Standardizes import syntax across the client codebase to use explicit TypeScript path aliases and ES module conventions. This unpacks several changes from the vue and vite/vitest branches.

  • Replace bare module imports with @/ prefix (TypeScript paths)
  • Add explicit .vue extensions to component imports
  • Remove webpack-specific syntax (~ prefix in SCSS)
  • Convert to standard ESM imports (DOMPurify default import)

All changes are backward-compatible with webpack/etc. and improve compatibility with modern build tools and ES module standards. They are also necessary for upcoming tooling changes.

I may add more to this (and it needs formatting/reorg that's waiting for the end), but I will keep this concise and mergeable.

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

@github-actions github-actions bot added this to the 26.0 milestone Oct 29, 2025
@dannon dannon marked this pull request as draft October 29, 2025 19:14
@dannon dannon force-pushed the standardization-pass branch from a867c0b to 3565984 Compare October 29, 2025 20:04
dannon added 12 commits November 3, 2025 10:00
Replace webpack bare imports (components/, utils/, app, etc.) with TypeScript
path aliases (@/components/, @/utils/, @/app) to prepare for Vite. Both build
systems support the @/ prefix via tsconfig.json.
Use explicit .vue file extensions in import statements where the imported
file is a Vue component. Required for Vite's ES module resolution.
Add explicit type annotation to DEFAULT_FILTERS to allow dynamic property
access. The code adds/removes properties like history_content_type at runtime,
so the type needs to reflect that flexibility.
Replace ~bootstrap, ~@FortAwesome with standard node_modules imports and
~scss/ with @/style/scss/ for Vite compatibility.
Replace bare theme/ and scss/ imports with @/style/scss/ prefix for
consistent module resolution across webpack and Vite.
Change from named import to default import and update all usage from
sanitize() to purify.sanitize() for Vite ESM support.
Complete import standardization for stores/, api/, watch/, and
custom_theme_variables.scss to use @/ prefix.
Fix remaining bare SCSS imports in onload/index.js and style.js
@dannon dannon force-pushed the standardization-pass branch from 1942f09 to fb89238 Compare November 3, 2025 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant