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

feat: implmenet a use defaults system WIP fixes #1607 #1889

Merged
merged 14 commits into from
May 17, 2024

Conversation

VividLemon
Copy link
Member

Describe the PR

A clear and concise description of what the pull request does.

Small replication

A small replication or video walkthrough can help demonstrate the changes made. This is optional, but can help observe the intended changes. A mentioned issue that contains a replication also works.

PR checklist

What kind of change does this PR introduce? (check at least one)

  • Bugfix 🐛 - fix(...)
  • Feature - feat(...)
  • ARIA accessibility - fix(...)
  • Documentation update - docs(...)
  • Other (please describe)

The PR fulfills these requirements:

  • Pull request title and all commits follow the Conventional Commits convention or has an override in this pull request body This is very important, as the CHANGELOG is generated from these messages, and determines the next version type. Pull requests that do not follow conventional commits or do not have an override will be denied

…es instead

fix(BTable): selectedItems not clearing values properly fixes bootstrap-vue-next#1878

fix(BTable): selectedItems with range not displaying class

test(BTableLite): toggle details functionality

test(BTable): selectedItems functioanlity
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'
Copy link

stackblitz bot commented May 14, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@VividLemon
Copy link
Member Author

Also need to write docs for this section

@VividLemon VividLemon marked this pull request as draft May 14, 2024 19:31
Copy link
Member Author

@VividLemon VividLemon left a comment

Choose a reason for hiding this comment

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

Remember to revert main.ts

@VividLemon VividLemon requested a review from xvaara May 16, 2024 22:47
@xvaara
Copy link
Contributor

xvaara commented May 16, 2024

Just heading to sleep. 5min look seems nice. I'll have time next week to look at this and other stuff.

Should we add the handeling of modelValue to useDefaults? pass emit to it, revert back to vueuse style handeling of it... Just an idea, not really sure about it.

@VividLemon
Copy link
Member Author

Should we add the handeling of modelValue to useDefaults? pass emit to it, revert back to vueuse style handeling of it... Just an idea, not really sure about it.

There are some examples of how its used. Its a bit strange code, all boilerplate. But its just a computed setter.

@VividLemon
Copy link
Member Author

@xvaara Something that I didn't think about is the fact that we don't know whether or not the modelvalue is bound. This causes a problem:

const props = useDefaults<typeof _props>(_props, 'BAccordion')
const _modelValue = defineModel<string | undefined>({
  default: undefined,
})
const modelValue = computed({
  get: () => props.modelValue,
  set: (v) => {
    _modelValue.value = v
  },
})

When we bind to props.modelValue when it's using the "passive" version of the modelValue, it's then bound to the wrong value.

<BAccordion /> 

This won't work, because internally its supposed to be using the ref. However, since we bounded to the props, it fails.

I'm not sure if there's a way to detect this (I don't think there is). Meaning, I think we may just have to refuse global options for modelValues

…. Modifiers should behave more like native Vue modifiers (number modifier with unparseable value returns value as is)

feat(BFormInput): type number performs the same as modifier

feat(BCarouselSlide): allow individual interval for slides

feat: global options system

chore: update deps to fix some issues (nuxt useId, vue-tsc etc)
@VividLemon VividLemon marked this pull request as ready for review May 17, 2024 22:18
@VividLemon
Copy link
Member Author

feat: implement a use defaults system fixes #1607

feat: implement global alias system fixes #1753

refactor: add bvn:: prefix to symbol keys

refactor: fix typo in 'BCardImageProps' change to 'BCardImgProps'

feat(BFormInput)!: move props lazy, trim & number to v-model modifier. Modifiers should behave more like native Vue modifiers (number modifier with unparseable value returns value as is)

feat(BFormInput): type number performs the same as modifier

feat(BCarouselSlide): allow individual interval for slides

chore: update deps to fix some issues (nuxt useId, vue-tsc etc)

docs: global options, aliases

feat(nuxt): automatically globally set teleportTo to #teleports

feat(BreakpointProps)!: strongly type breakpoints. Instead of weak string | number => 1,2,3...'1','2','3'...

refactor(BRow): use script setup instead of options api

refactor(BCol): use script setup instead of options api

@VividLemon VividLemon merged commit 8e73b17 into bootstrap-vue-next:main May 17, 2024
3 checks passed
@github-actions github-actions bot mentioned this pull request May 17, 2024
xvaara added a commit to xvaara/bootstrap-vue-next that referenced this pull request May 22, 2024
* upstream/main: (23 commits)
  feat(BInput): Alias BFormInput to BInput
  fix(nuxt): dont teleport everything to #teleports -- selectively teleport based on body fixes bootstrap-vue-next#1898
  chore: release main
  feat(nuxt): allow passthrough options to createBootstrap plugin
  chore: release main (bootstrap-vue-next#1894)
  feat: implmenet a use defaults system WIP fixes bootstrap-vue-next#1607  (bootstrap-vue-next#1889)
  docs(BCheckBox*): Small changes to get documentation to parity (bootstrap-vue-next#1873)
  docs: Add component reference link in the page table of contents sidebar
  fixed BTableLite item _showDetails
  BTable delete selection when primary-key
  chore: release main
  feat(BTable): add change event -- replaces bv `modelValue` see bootstrap-vue-next#1775 (comment)
  chore: release main
  fix(BTable): selectedItems not clearing values properly fixes bootstrap-vue-next#1878 (bootstrap-vue-next#1879)
  chore: release main (bootstrap-vue-next#1874)
  fix(BTable): Pass through original records to slots in most circumstances (bootstrap-vue-next#1869)
  chore: release main (bootstrap-vue-next#1867)
  feat(BTable): Allow dot in sortby key
  fix: update dependencies to fix a bug in vue compiler (bootstrap-vue-next#1866)
  chore: release main (bootstrap-vue-next#1859)
  ...
Pequem pushed a commit to Pequem/bootstrap-vue-next that referenced this pull request May 28, 2024
… (bootstrap-vue-next#1889)

feat: implement a use defaults system fixes bootstrap-vue-next#1607

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'

feat(BFormInput)!: move props lazy, trim & number to v-model modifier. Modifiers should behave more like native Vue modifiers (number modifier with unparseable value returns value as is)

feat(BFormInput): type number performs the same as modifier

feat(BCarouselSlide): allow individual interval for slides

chore: update deps to fix some issues (nuxt useId, vue-tsc etc)

docs: global options, aliases

feat(nuxt): automatically globally set teleportTo to `#teleports`

feat(BreakpointProps)!: strongly type breakpoints. Instead of weak string | number => 1,2,3...'1','2','3'...

refactor(BRow): use script setup instead of options api

refactor(BCol): use script setup instead of options api
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.

None yet

2 participants