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

Release 0.1.3 #229

Merged
merged 164 commits into from
Apr 13, 2024
Merged

Release 0.1.3 #229

merged 164 commits into from
Apr 13, 2024

Conversation

kikuomax
Copy link
Collaborator

Finally.

Proposed Changes

  • Sync the dev and main branches. We already have reviewed all the changes.

Please do not use the button on GitHub to merge this PR. I will manually git merge --ff-only the dev branch on top of the main after approval.

wesdevpro and others added 30 commits November 16, 2023 15:02
- `static` folder contains assets for the `docs` package.
- Vite expects public assets in `public` folder.
- Installs `pre-commit` package that is triggered when one runs `git
  commit`. However, it does nothing until we restore `pre-commit`
  property in `package.json`
- Installs the following packages that `docs` depends on:
    - `bulma-css-vars`
    - `cleave.js`
    - `scrollreveal`
    - `sortablejs`
    - `vue-breakpoint-mixin`
- Corrects the relative path to Buefy's `package.json` from
  `TheNavbar.vue`.
- Removes `server.fs` config in `vite.config.js`, because it is no
  longer necessary and even harmful as we started migrating to Lerna.
- Corrects the relative path to `buefy-next/utils/color.js` from the
  examples folder of `Colorpicker`.
- Installs `vite-plugin-commonjs` to import CommonJS files on Vite.
- Fixes the issue that the example of `bulma-css-vars` extension did not
  work. Problems were two-fold:
    1. `bulma-generated/bulma-colors.js` is not an ESM module, and Vite
       did not like it. Works around this with `vite-plugins-commonjs`
       plugin.
    2. `bulma-css-vars` includes a line that did not work as inteded
       with Vite. I was not able to figure out a workaround of this
       issue other than rewriting `bulma-css-vars`. So I decided to
       configure Vite to patch it with the plugin. There are two
       different plugins for development and production mode:
         - "transform-bulma-css-vars" plugin patches `bulma-css-vars`
           after Vite processes it with esbuild in development mode.
         - "load-bulma-css-vars" plugin patches `bulma-css-vars` when it
           is loaded in production mode.
- Fixes the issue that a code snippet of BulmaCssVars extension became
  "0". Replaces the obsolete `pre` filter syntax with `utils.preformat`
  call.
- Moves `netlify.toml` to `packages/docs` because it is specific to the
  docs package.
- Configures Netlify to forward all the traffic that is not resolved to
  existing files to the root `/` so that the SPA can determine which
  contents to deliver. This configuration should make pre-rendering
  unnecessary.
- The `build` script copies `netlify.toml` to `dist` folder.
- Downgrades `@mdi/font` to v6.9.96, because v7.x deprecated and removed
  the Discord icon. Since other brand icons like GitHub will also go
  away in v8.x, we should consider other icon sources; e.g., Simple
  Icons.
- Because we upgraded `@mdi/font`.
- Installs `@mdi/font` v6.9.96.
Co-Authored-By: Kikuo Emoto <kemoto@codemonger.io>
- `highlight.js` v11.9.0 is the latest version as of this commit.
- Because we bumped `highlight.js` to v11.x.
- Fixes the issue that syntax highlighting was not applied to code
  blocks due to the outdated `highlight` directive define in the Vue 2
  manner. Corrects the definition of `highlight` directive so that it
  works on Vue 3:
    - renames `bind` → `beforeMount`
    - renames `componentUpdated` → `updated`

  See https://v3-migration.vuejs.org/breaking-changes/custom-directives.html

  Removes `deep` option because it was deprecated and has no effect on
  Vue 3 (even on Vue 2).

  See https://v2.vuejs.org/v2/guide/migration#Custom-Directives-simplified

- Also fixes the deprecation warnings from the new version of
  `highlight.js`:
    - renames `highlightBlock` → `highlightElement`
- Fixes the issue that the text input on the search modal did not work.
  Replaces "@input" → "@update:model-value" on the `<b-input>` for
  search terms.

  The `<b-input>` for the search terms intended to call the `search`
  method whenever a new text was inputted. It was listening for "input"
  events to receive inputted texts (model value) and it worked on Vue 2.
  However, it broke on Vue 3, because Vue 3 changed the name of events
  triggered when a model value is updated from "input" to
  "update:modelValue". Since "input" overlaps with events from the
  underlying `<input>` of `<b-input>`, the `search` method started to
  receive `InputEvent` objects instead of inputted texts.
- Fixes the version displayed on the Home view.
- Because we upgraded `@mdi/font`.
#16) (#195)

* feat(lib): add compat fallthrough to Autocomplete

- `Autocomplete` introduces a new prop `compat-fallthrough` that
  determines if the `class`, `style`, and `id` attributes are applied to the
  root `<div>` element instead of the underlying `BInput` component.
  Since Vue 3 changed the fallthrough behavior, `Autocomplete` became
  incompatible with Buefy for Vue 2. The default value for this prop is
  configured by the `defaultCompatFallthrough` config option, which is
  `true` by default.

* test(lib): test Autocomplete fallthrough behavior

- Tests the new prop `compat-fallthrough` of `Autocomplete`.
- Refreshes the test snapshot of `Taginput` which is affected by the
  change of `Autocomplete`.

* chore(docs): explain compat-fallthrough of Autcomplete

* docs(CHANGELOG): add new compat-fallthrough prop of Autcomplete
…ed issue (#194) (#196)

* feat(lib): make Dropdown stop using ProviderParentMixin

- `Dropdown` stops mixing in `ProviderParentMixin` but just `provide`s
  its instance associated with `DROPDOWN_INJECTION_KEY` because
  `Dropdown` does not use any funcitionalities of `ProviderParentMixin`.
- `DropdownItem` stops mixing in `InjectedChildMixin` but just `inject`s
  the instance of `Dropdown` associated with `DROPDOWN_INJECTION_KEY`.
- `DROPDOWN_INJECTION_KEY` is a unique `Symbol`.
- Updates also the spec.

* feat(lib): make Progress stop using ProviderParentMixin

- `Progress` stops mixing in `ProviderParentMixin` but `provide`s its
  instance associated with `PROGRESS_INJECTION_KEY` because `Progress`
  does not use any functionalities of `ProviderParentMixin`.
- `ProgressBar` stops mixin in `InjectedChildMixin` but `inject`s the
  instance of `Progress` associated with `PROGRESS_INJECTION_KEY`.
- `PROGRESS_INJECTION_KEY` is a unique `Symbol`.
- Updates the spec for `ProgressBar`. It also introduces a new test case
  that tests `ProgressBar` reads `max` from the parent `Progress`.
  Refreshes the spec snapshot.

* fix(lib): BTabs did not work in SSR, and BCarousel

- The issue that `BTabs` did not work in Server Side Rendering (SSR)
  due to `window` access. `window` was necessary to generate a random
  number to initialize `value` prop of `BTabItem` with a unique value
  when `value` is omitted. Before Vue 3 migration, it used to use
  `this._uid` internal field to initialze `value`. However, `this` is no
  longer available during the prop initialization on Vue 3. So I came up
  with the idea of random numbers. Since random numbers also won't work
  well with SSR, we had to give up random numbers anyway. A new approach
  is to avoid direct use of `value` prop but computed `uniqueValue`
  which becomes `value` if it is non-null, otherwise `this.$.uid`
  internal field. Definitions of `value` and `uniqueValue` are hoisted
  to `InjectedChildMixin` which `BTabs` mixes in through
  `TabbedChildMixin` because there was another problem with
  `CarouselItem` (see below).

- `CarouselItem` is another component that mixes in
  `InjectedChildMixin`. There was a bug that `CarouselItem` was not able
  to be correctly removed from the parent `Carousel`. This bug is also
  fixed by defining `value` and `uniqueValue` in `InjectedChildMixin`.

- `ProviderParentMixin`, `TabbedMixin`, `TabbedChildMixin`, `Tabs`,
  `Steps`, and `CarouselItem` use `uniqueValue` instead of `value`
  whenever the identity of the child matters.

- `Carousel` introduces `activeChildIndex` that `CarouselItem` uses to
  determine the item is active, because `activeChild` of `Carousel` is
  an index in the array that `Carousel` locally holds and may not match
  the `index` that `CarouselItem` recognizes.

- `utils/make-unique-id.js` no longer necessary.

- Introduces new test cases for `TabItem`, `StepItem`, and
  `CarouselItem` that make sure `uniqueValue` and `order` work.
  Refreshes the spec snapshot of `CarouselItem`.

* feat(docs): add CarouselItem show/hide

- `ExFull` example for `Carousel` introduces a new switch to show/hide a
  certain slide in `Carousel`. This makes sure that `order` prop of
  `CarouselItem` works.

* style(docs): fix lint error

* feat(docs): introduce order prop

- Examples of `Carousel`, `Steps`, and `Tabs` explain how to use `order`
  prop.

* docs: update CHANGELOG

- `CHANGELOG` explains `order` prop of `CarouselItem`, `StepItem`, and
  `TabItem`.
* feat(lib): add CompatFallthroughMixin

- Introduces a new mixin `CompatFallthroughMixin` in `utils`, which
  defines the common interface for components that want to maintain the
  attributes fallthrough behavior compatible with Vue 2.
  - `compatFallthrough` prop determines if the fallthrough behavior is
    kept compatible with Vue 2
  - `rootAttrs` computed value provides attributes to be bound to the
    root element
  - `fallthroughAttrs` computed value provides attributes to be bound to
    the underlying element

* refactor(lib): apply CompatFallthroughMixin to Input

- Lets `Input` mix in `CompatFallthroughMixin`. The `rootClasses` no
  longer includes `this.$attrs.class` when `compatFallghrough` is
  `true`, because `rootAttrs` includes it. Replaces `inputAttrs` with
  `fallthroughAttrs`.

  The spec of `Input` makes sure that unncessary attribute fallthrough
  does not happen. Also fixes an error caused due to the change of
  mixins.

* refactor(lib): apply CompatFallthroughMixin to Autocomplete

- Lets `Autocomplete` mix in `CompatFallthroughMixin`. Replaces
  `inputAttrs` with `fallthroughAttrs`.

  The spec of `Autocomplete` makes sure that unnecessary fallthrough
  does not happen.

* docs(CHANGELOG): group compat-fallthrough

- Groups changes related to the introduction of the `compat-fallthrough`
  prop.

* docs(CHANGELOG): reserve changes around compat-fallthrough

- Reserves change items related to the `compat-fallthrough` prop so that
  upcoming parallel updates won't conflict.
…16) (#211)

* feat(lib): add compat-fallthrough prop to Datepicker

- `Datepicker` introduces a new prop `compat-fallthrough` which
  determines if the `class`, `style`, and `id` attributes are applied to
  the root `<div>` element or the underlying `<b-input>` component.
  Since Vue 3 changed the fallthrough behavior, `Datepicker` became
  incompatible with that of Buefy for Vue 2. The default value of this
  prop is determined by the `defaultCompatFallthrough` config option
  that is `true` by default.

* test(lib): test Datepicker fallthrough behavior

- Adds new test cases that test the new `compat-fallthrough` prop of
  `Datepicker`

* chore(docs): explain compat-fallthrough prop of Datepicker

* docs(CHANGELOG): explain compat-fallthrough prop of Datepicker
…) (#212)

* feat(lib): add compat-fallthrough prop to MenuItem

- `MenuItem` introduces a new prop `compat-fallthrough` that determines
  if the `class`, `style`, and `id` attributes are applied to the root
  `<li>` element or the underlying tag. Since Vue 3 changed the
  fallthrough behavior, `MenuItem` became incompatible with that of
  Buefy for Vue 2. The default value of this prop is determined by the
  `defaultCompatFallthrough` config option that is `true` by default.

* test(lib): test MenuItem fallthrough behavior

- Adds test cases for the `compat-fallthrough` prop of `MenuItem`

* chore(docs): explain compat-fallthrough prop of MenuItem

* docs(CHANGELOG): explain compat-fallthrough prop of MenuItem
…YLE (#16) (#213)

* feat(lib): add compat-fallthrough prop to NavbarDropdown

- `NavbarDropdown` introduces a new prop `compat-fallthrough` which
  determines if the `class`, `style`, and `id` attributes are applied to
  the root `<div>` element or the underlying tag. Since Vue 3 changed
  the fallthrough behavior, `NavbarDropdown` became incompatible with
  that of Buefy for Vue 2. The default value of this prop is given
  by the `defaultCompatFallthrough` config option that is `true` by
  default (compatible with Buefy for Vue 2).

* test(lib): test NavbarDropdown fallthrough behavior

- Adds test cases for the `compat-fallthrough` prop of `NavbarDropdown`

* chore(docs): explain compat-fallthrough prop of NavbarDropdown

* docs(CHANGELOG): explain compat-fallthrough prop of NavbarDropdown
…#16) (#214)

* feat(lib): add compat-fallthrough prop to Numberinput

- `Numberinput` introduces a new prop `compat-fallthrough` which
  determines if the `class`, `style`, and `id` attributes are applied to
  the root `<div>` element or the underlying `<b-input>` component.
  Since Vue 3 changed the fallthrough behavior, `Numberinput` became
  incompatible with that of Buefy for Vue 2. The default value of this
  prop is given by the `defaultCompatFallthrough` config option
  that is `true` by default (compatible with Buefy for Vue 2).

* test(lib): test Numberinput fallthrough behavior

- Adds test cases for the `compat-fallthrough` prop of `Numberinput`

* chore(docs): explain compat-fallthrough prop of Numberinput

* docs(CHANGELOG): explain compat-fallthrough prop of Numberinput
#215)

* feat(lib): add compat-fallthrough prop to Select

- `Select` introduces a new prop `compat-fallthrough` which determines
  if the `class`, `style`, and `id` attributes are applied to the root
  `<div>` element or the underlying `<select>` element. Since Vue 3
  changed the fallthrough behavior, `Select` became incompatible with
  that of Buefy for Vue 2. The default value of this prop is given by
  the `defaultCompatFallthrough` config option that is `true` by default
  (compatible with Buefy for Vue 2).

* test(lib): test Select fallthrough behavior

- Adds test cases for the `compat-fallthrough` prop of `Select`

* chore(docs): explain compat-fallthrough prop of Select

* docs(CHANGELOG): explain compat-fallthrough prop of Select
…#16) (#216)

* feat(lib): add compat-fallthrough prop to SliderThumb

- `SliderThumb` introduces a new prop `compat-fallthrough` which
  determines the `class`, `style`, and `id` attributes are applied to
  the root or inner `<div>` element. Since Vue 3 changed the fallthrough
  behavior, `SliderThumb` became incompatible with that of Buefy for Vue
  2. The default value of this prop is given by the
  `defaultCompatFallthrough` config option that is `true` by default
  (compatible with Buefy for Vue 2).

* test(lib): test SliderThumb fallthrough behavior

- Adds test cases for the `compat-fallthrough` prop of `SliderThumb`

* docs(CHANGELOG): explain compat-fallthrough prop o SliderThumb
…#217)

* feat(lib): add compat-fallthrough prop to Table

- `Table` introduces a new prop `compat-fallthrough` which determines if
  the `class`, `style`, and `id` attributes are applied to the root
  `<div>` element or the underlying `<b-table-pagination>` components.
  Since Vue 3 changed the fallthrough behavior, `Table` became
  incompatible with that of Buefy for Vue 2. The default value of this
  prop is given by the `defaultCompatFallthrough` config option that is
  `true` by default (compatible with Buefy for Vue 2).

* test(lib): test Table fallthrough behavior

- Adds test cases for the `compat-fallthrough` prop of `Table`

* chore(docs): explain compat-fallthrough prop of Table

* docs(CHANGELOG): explain compat-fallthrough prop of Table
…) (#218)

* feat(lib): add compat-fallthrough prop to Taginput

- `Taginput` introduces a new prop `compat-fallthrough` which determines
  the `class`, `style`, and `id` attributes are applied to the root
  `<div>` element or the underlying `<b-autocomplete>` component. Since
  Vue 3 changed the fallthrough behavior, `Taginput` became incompatible
  with that of Buefy for Vue 2. The default value of this prop is given
  by the `defaultCompatFallthrough` config option that is `true` by
  default (compatible with Buefy for Vue 2).

* test(lib): test Taginput fallthrough behavior

- Adds test cases for the `compat-fallthrough` prop of `Taginput`

* chore(docs): explain compat-fallthrough prop of Taginput

* docs(CHANGELOG): explain compat-fallthrough prop of Taginput
#219)

* feat(lib): add compat-fallthrough prop to Upload

- `Upload` introduces a new prop `compat-fallthrough` which determines
  if the `class`, `style`, and `id` attributes are applied to the root
  `<label>` element or the underlying `<input>` element. Since Vue 3
  changed the fallthrough behavior, `Upload` became incompatible with
  that of Buefy for Vue 2. The default value of this prop is given by
  the `defaultCompatFallthrough` config option that is `true` by default
  (compatible with Buefy for Vue 2).

  Replaces the `classAndStyle` computed value with `rootAttrs`, which
  did not address the `id` attribute.

* test(lib): test Upload fallthrough behavior

- Adds test cases for the `compat-fallthrough` prop of `Upload`

* chore(docs): explain compat-fallthrough prop of Upload

* docs(CHANGELOG): explain compat-fallthrough prop of Upload
…YLE (#16) (#209)

* feat(lib): add compat fallthrough prop to BreadcrumbItem

- `BreadcrumbItem` introduces a new prop `compat-fallthrough` which
  determines if the `style`, `class`, and `id` attributes falls through
  to the root `<li>` element rather than the underlying tag. Since Vue 3
  changed the fallthrough behavior, `BreadcrumbItem` became incompatible
  with that of Buefy for Vue 2. The default value for this prop is
  configured by the `defaultCompatFallthrough` config option, which is
  `true` by default (compatible with Buefy for Vue 2).

* test(lib): test BreadcrumbItem fallthrough behavior

- Tests the new prop `compat-fallthrough` of `BreadcrumbItem`

* chore(docs): explain compat-fallthrough of BreadcrumbItem

* docs(CHANGELOG): explain compat-fallthrough of BreadcrumbItem
…_CLASS_STYLE (#16) (#210)

* feat(lib): mix CompatFallthroughMixin in TimepickerMixin

- `TimepickerMixin` mixes in `CompatFallthroughMixin`, because both
  hosts `Clockpicker` and `Timepicker` provide fallthrough behavior.

* feat(lib): add compat fallthrough to Clockpicker

- `Clockpicker` introduces a new prop `compat-fallthrough`, which
  determines if the `class`, `style`, and `id` attributes are applied to
  the root `<div>` element or the underlying `BInput` component. Since
  Vue 3 changed the fallthrough behavior, `Clockpicker` became
  incompatible with that of Buefy for Vue 2. The default value of this
  prop is configured by the `defaultCompatFallthrough` config option,
  which is `true` by default (compatible with Buefy for Vue 2).

* test(lib): test compat-fallthrough prop of Clockpicker

- Tests the fallthrough behavior of `Clockpicker`

* feat(lib): add compat fallthrough to Timepicker

- `Timepicker` introduces a new prop `compat-fallthrough`, which
  determines if the `class`, `style`, and `id` attributes are applied to
  the root `<div>` element or the underlying `BInput` component. Since
  Vue 3 changed the fallthrough behavior, `Timepicker` became
  incompatible with that of Buefy for Vue 2. The default value for this
  prop is configured by the `defaultCompatFallthrough` config option,
  which is `true` by default (compatible with Buefy for Vue 2).

* test(lib): test fallthrough behavior of Timepicker

- Tests the fallthrough behavior of `Timepicker`

* chore(docs): explain compat-fallthrough of Clockpicker

* chore(docs): explain compat-fallthrough of Timepicker

* docs(CHANGELOG): explain compat-fallthrough of Clockpicker and Timepicker
…fy#4017) (buefy#4019)

* fix: Tooltip did not work in SSR due to AbortController

Fixes the bug that `Tooltip` did not work in Server Side Rendering
(SSR) due to `window.AbortController` use; i.e., no `window` is
available in SSR. Moves `window.AbortController` access inside the
`window` availability check.

* docs: update CHANGELOG

Adds unreleased entry for v0.9.29.
Lists the fix of the `window.AbortController` use in SSR.
…h form in modal (buefy#4018) (buefy#4021)

* fix(lib): infinite Field updates

- Fixes the bug that `Field` caused infinite recursions when both
  `grouped` and `horizontal` attributes were `true`, and a validation
  error was set. There were circular updates of the `newMessage` data
  field and the `message` prop of the child `Field`s. To break the loop,
  `watch` of the `message` prop makes sure that the contents of the new
  value are different from the `newMessage` data field before updating
  `newMessage`. Simple identity check won't work because `message`
  receives a brand new array every time.

* test(lib): add test cases for Field with grouped and horizontal

- Adds new test cases that test `Field` with `grouped` and `horizontal`
  attributes `true`. The test would never stop due to infinite
  recursions if the previous fix were not applied.

  Includes adaptation for @vue/test-utils V2:
  - `find(Component)` → `findComponent(Component)`
  - `findAll(Component)` → `findAllComponents(Component)`
  - `.at(i)` → `[i]` when accessing an item in `findAllComponents`
    results. @vue/test-utils V2 returns an ordinary array
  - `localVue` → `global: { components }`: @vue/test-utils V2 no longer
    supports `localVue`
  - `propsData` → `props`: `propsData` still works, but prepares for
    possible future deprecation

* docs(CHANGELOG): update unreleased log

- Adds the fix of `Field` freezing due to infinite recursions.
- Explains the issue that remains after fixing the frozen Field bug.

* chore(docs): add warning on grouped and horizontal (Field)

- Adds warnings of not mixing `grouped` and `horizontal` props of
  `Field`.
- The installation instruction of Buefy for Vue 3 (buefy-next) aliases
  `@ntohq/buefy-next` as `buefy`. This will mitigate the migration cost
  for users of buefy-next that will eventually be released as buefy@1.

  See: https://www.reddit.com/r/vuejs/comments/wg1b0u/comment/kttd5sa/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button
The installation instruction in `README.md` shows how to install
`@ntohq/buefy-next` under the `buefy` alias.
Some spec snapshots were affected by introduction of the
`compat-fallthrough` prop by `Input` or `Autocomplete`; the
`compat-fallthrough` prop appeared on the underlying stubbed components.
However, `Input` and `Autocomplete` later introduced the
`CompatFallthroughMixin` mixin to reduce the duplicate code. Since
stubbed components won't bear props in mixins, the affected snapshots no
longer contain the `compat-fallthrough` prop on the stubs.
- Specifies the `buefy` alias to development packages
- Corrects CDN paths for buefy-next
  - But tells that including buefy-next via a <script> tag is not
    currently working
* docs: use absolute paths in README.md

Uses absolute paths for the following links in `README.md`:
- MIGRATION-NOTE.md
- CHANGELOG.md
- .github/CONTRIBUTING.md

Benefits:
- We can copy `README.md` into `packages/buefy-next` without modifying
  the above links
- I think this would also be effective on npmjs.
  See https://stackoverflow.com/a/68738752

* docs(lib): copy root README to packages/buefy-next

So that `buefy-next` will bundle the latest `README.md` in the package.
Prepares `CHANGELOG` for the release of v0.1.3.
- Adds missing changes in v0.1.3
- Adds missing changes in v0.1.2
- Removes the "unreleased" tag from v0.1.3

I decided to prefix "B" to component names, because user-facing
component names start with "b-". In addition, if users want to import
individual components, their names start with "B". So our communication
will be more consistent if we prefix "B" to component names.
* chore: uninstall lerna

Uninstalls `lerna` because we are not currently using it.

* chore: remove __tests__ folder

Removes the `packages/buefy-next/__tests__` folder because it does not
contain meaningful tests. I think this was created when we were trying a
new project structure.
@kikuomax kikuomax requested a review from wesdevpro April 11, 2024 22:22
@kikuomax kikuomax merged commit 6b92f77 into main Apr 13, 2024
7 checks passed
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