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

Feature: Add order, renewQuery, and reactivity to Vue component #229

Merged
merged 6 commits into from
Oct 11, 2019

Conversation

TCBroad
Copy link
Contributor

@TCBroad TCBroad commented Oct 10, 2019

Check List

  • Tests has been run in packages where changes made if available
  • Linter has been run for changed code
  • Tests for the changes have been added if not covered yet
  • Docs have been added/updated if required

Issue Reference this PR resolves

None, just an enhancement and brings the vue component more inline with the plain js version.

Description of Changes Made (if issue reference is not provided)

  • Updated vue QueryBuilder component to enable reactivity on the query prop
  • Added ordering support to QB
  • Added renewQuery support to QB
  • Fixed some spelling/grammar problems in the vue docs.

@TCBroad TCBroad changed the title Feature/vue order reactivity Feature: Add order, renewQuery, and reactivity to Vue component Oct 10, 2019
@paveltiunov
Copy link
Member

@TCBroad Hey Tom! Thanks for contributing this! This one like seems like good to merge. I'm curious how do you use it? I was thinking about what if we can introduce some sort of generic state handling for properties not managed by QueryBuilder. This way each time new property is added to query format it's already supported by QueryBuilder the same way as react package does. @TCBroad @richipargo would love to hear your thoughts here.

@paveltiunov paveltiunov merged commit 9293f13 into cube-js:master Oct 11, 2019
@TCBroad
Copy link
Contributor Author

TCBroad commented Oct 11, 2019

Hi @paveltiunov, thanks for merging!
We use the reactivity portion to update QueryBuilders in child components where the filter is controlled in the parent. It was difficult to hook into updateFilters without adding a load of watches and boilerplate in each component.
I haven't looked at the react package much but I think it would be a good idea to have some way to automatically pick up the properties. Could the same code be ported over to vue?

@TCBroad TCBroad deleted the feature/vue-order-reactivity branch October 11, 2019 18:21
@richipargo
Copy link
Contributor

Hey @paveltiunov and @TCBroad,

While I did base off some of my initial component work from the React implementation I think the underlying reactivity systems differ so we cannot do the same, but also features are not the same yet, so it still requires a lot of work and I've been glad @TCBroad has improved on top of my initial work.

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.

3 participants