Skip to content
This repository was archived by the owner on Jun 1, 2025. It is now read-only.

fix: menu list as template - #163

Merged
kikuomax merged 3 commits into
ntohq:devfrom
dword-design-org:menu-list-template
Jan 16, 2024
Merged

kikuomax merged 3 commits into
ntohq:devfrom
dword-design-org:menu-list-template

Conversation

@dword-design

Copy link
Copy Markdown

I turned the menu list into a template, first for consistency and the function implementation didn't work in Nuxt production.

@kikuomax
kikuomax marked this pull request as draft January 7, 2024 07:08
@kikuomax

kikuomax commented Jan 7, 2024

Copy link
Copy Markdown
Collaborator

@dword-design Thank you for your contribution! But could you make the PR to dev branch?

@dword-design
dword-design changed the base branch from main to dev January 8, 2024 08:06
@dword-design

Copy link
Copy Markdown
Author

@kikuomax done

wesdevpro
wesdevpro previously approved these changes Jan 8, 2024

@wesdevpro wesdevpro left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM⚡Please wait for @kikuomax to review this code before pulling this PR into dev.
(I just realized this PR is still a draft 😅)

@kikuomax

kikuomax commented Jan 9, 2024

Copy link
Copy Markdown
Collaborator

@dword-design @wesdevpro Please give me some time to see if there might be potential drawbacks.

@kikuomax

kikuomax commented Jan 9, 2024

Copy link
Copy Markdown
Collaborator

@dword-design @wesdevpro I will look into this PR after I finish #159.

Comment thread packages/buefy-next/src/components/menu/MenuList.vue Outdated
@kikuomax

Copy link
Copy Markdown
Collaborator

I turned the menu list into a template, first for consistency and the function implementation didn't work in Nuxt production.

@dword-design Did you mean functional components wouldn't work in Nuxt production in general?

@kikuomax
kikuomax marked this pull request as ready for review January 15, 2024 09:05
@dword-design

dword-design commented Jan 15, 2024 •

Copy link
Copy Markdown
Author

I turned the menu list into a template, first for consistency and the function implementation didn't work in Nuxt production.

@dword-design Did you mean functional components wouldn't work in Nuxt production in general?

@kikuomax Ok I debugged myself into this and I think the problem is that we use component.name to register the components in the plugins. This is generally not a problem since also for functional components component.name will be the name of the function (in this case BMenuList). But in production and in the browser the function name will be a generated one (in this case ng), so the component name is wrong. In other cases we explicitly set the name as a fiel via Options API. So functional components aren't directly a problem in Nuxt but it's more how it's solved in Buefy.

@kikuomax

Copy link
Copy Markdown
Collaborator

@dword-design Great insight!

Now, I remember I faced the exact problem fixed at d44e6d2 that is not merged to main branch yet.

@kikuomax

Copy link
Copy Markdown
Collaborator

@dword-design Great insight!

Now, I remember I faced the exact problem fixed at d44e6d2 that is not merged to main branch yet.

While the problem should have already been solved, I think an ordinary component is more intuitive and this PR is still relevant.

@kikuomax kikuomax left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good to me!

@kikuomax
kikuomax merged commit decc2c0 into ntohq:dev Jan 16, 2024
@dword-design
dword-design deleted the menu-list-template branch January 16, 2024 20:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

No open projects
Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

3 participants