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

fix(OnyxDataGrid): export sorting types #2568

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

larsrickert
Copy link
Collaborator

Remove scoped namespace for exporting data grid feature types.

Feedback from @oemueller

Checklist

  • A changeset is added with npx changeset add if your changes should be released as npm package (because they affect the library usage)

Copy link

changeset-bot bot commented Jan 21, 2025

🦋 Changeset detected

Latest commit: 61e35cb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
sit-onyx Patch
demo-app Patch
playground Patch
@sit-onyx/chartjs-plugin Patch
@sit-onyx/nuxt Patch
@sit-onyx/vitepress-theme Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Collaborator

@JoCa96 JoCa96 left a comment

Choose a reason for hiding this comment

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

I am not a fan tbh. We will be running into naming collisions at some point. So we either need to namespace types or put a prefix into their name (like DataGridSortState).
I prefer namespacing as it is better readable IMHO.

Which issue are we trying to solve with this PR specifically?

@JoCa96 JoCa96 self-assigned this Jan 21, 2025
@larsrickert
Copy link
Collaborator Author

I am not a fan tbh. We will be running into naming collisions at some point. So we either need to namespace types or put a prefix into their name (like DataGridSortState). I prefer namespacing as it is better readable IMHO.

Which issue are we trying to solve with this PR specifically?

I think the main issue/confusing is that if you take a look at the docs or component types, the type will always be just SortState. So if you want to define your own variable with this type, you'd expect it to be imported by import { SortState } from "sit-onyx"; but that does currently not work. Also the IDE will not auto-suggest the import so the user might think that the type is missing

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