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

Implement aliasing system #1753

Closed
3 tasks done
yogeshgalav opened this issue Feb 7, 2024 · 6 comments · Fixed by #1894
Closed
3 tasks done

Implement aliasing system #1753

yogeshgalav opened this issue Feb 7, 2024 · 6 comments · Fixed by #1894
Assignees
Labels
enhancement New feature or request

Comments

@yogeshgalav
Copy link

Clear and concise description of the problem

When migrating from bootstrap-vue to bootstrap-vue-next, one of the major problem which leads to major code change is
"BInput" component not present, this componen is present but with other name "BFormInput"
Goal: minimum code change while migrating from bootstrap-vue.
Benifit: less boiler plate for component name, less or no code change for migration

Suggested solution

The Alias for BFormInput should be BInput
just like Bootstrap-vue
This can be achieved with component.d.ts

Alternative

New component BInput which directly exports BFormInput

Additional context

No response

Validations

@yogeshgalav yogeshgalav added the enhancement New feature or request label Feb 7, 2024
@VividLemon VividLemon self-assigned this Feb 7, 2024
@VividLemon VividLemon changed the title BInput not present - Alias for BFormInput component needed. Implement aliasing system Feb 7, 2024
@VividLemon
Copy link
Member

Related:
#1607
#1569

@yogeshgalav
Copy link
Author

@VividLemon Implementing external alias and exporting internal alias is different thing,
I think this project replaces bootstrap-vue with minimum code change.
If the goal I mention I true, then exporting BInput should be first priority.

and creating alias system for better developer experience is other thing.
There's difference between features which are essential, and which improve product quality.

@VividLemon
Copy link
Member

In my point of view, "internal aliasing" is just bloat. I have mixed feelings about adding official aliased names and instead would prefer a system where users could maintain their own sets of aliases.

@xvaara
Copy link
Contributor

xvaara commented Feb 13, 2024

IMHO, if it's just one search and replace on the codebase, I don't think we need to worry about this. Just document the change to a migration guide.

or something like:

import {BFormInput} from 'bootstrap-vue-next'
app.component('BInput', BFormInput)

@yogeshGroony
Copy link

@VividLemon Just wanted to save time and effort to change lot of codebase.
Please do it, from product point of view it would be great.
If you don't want to make internal alias, then you can keep short ones
Like everyone will prefer BInput over BFormInput
From product point please make the change,
there is no other alternate available for bootstrap-vue in market.

@VividLemon
Copy link
Member

VividLemon commented Feb 16, 2024

I was thinking about the purpose of the internal alias the other day, and came to the realization that it's a bit silly not to include it by default, as there isn't much of a downside... It doesn't necessarily need to be a default, but could be an opt in feature (one that would hopefully require a simple one line change perhaps). Or simply just be made the default. That being said, the inclusion of default aliases would also require the ability to add custom aliases. So, in conclusion, once I finish the alias system, I will include plans for default aliases.

VividLemon added a commit to VividLemon/bootstrap-vue-next that referenced this issue May 14, 2024
feat: implement global alias system fixes bootstrap-vue-next#1753

refactor: add bvn:: prefix to symbol keys

refactor: fix typo in 'BCardImageProps' change to 'BCardImgProps'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants