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

Basic Reactivity #42

Merged
merged 10 commits into from
Nov 15, 2019
Merged

Basic Reactivity #42

merged 10 commits into from
Nov 15, 2019

Conversation

wfischer42
Copy link
Contributor

This PR adds reactivity to the vue-cytoscape, specifically for the data and position element attributes. It also includes minor adjustments to the example config & data, adding types and exporting them separately.

It also includes a change that should add flexibility to how ID's are added, though I haven't fully tested it.

I'm working on adding an animate: boolean prop for elements that will add an animation to a reactive position change, and I'll finish adding reactivity to the remaining cytoscape element attributes, such as classes, renderedPosition, selected, and so on. I'm doing them manually to avoid the "remove and re-add" approach to updates, which doesn't work particularly well if you're dealing with nodes with connected edges.

@wfischer42
Copy link
Contributor Author

Addresses issues #41, #20, and #32

Copy link
Owner

@rcarcasses rcarcasses left a comment

Choose a reason for hiding this comment

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

Hi @wfischer42, thanks for your hard work, can you:

  • remove wfischer42-vue-cytoscape-1.0.6.tgz file
  • put "name": "vue-cytoscape" back in package.json
  • bump "version": "1.0.7" in package.json

please? I'll shortly merge your changes.

@wfischer42
Copy link
Contributor Author

Yeah, no problem! I'll take care of it now.
I'm new to contributing to open-source, so thanks for the review.

Also, I've never used Vuepress -- would you like me to figure it out and add documentation for the changes?

@rcarcasses
Copy link
Owner

thank you again. For adding/editing documentation modify the .md files here:

https://github.com/rcarcasses/vue-cytoscape/tree/master/docs

once committed, documentation will be build automatically.

@wfischer42
Copy link
Contributor Author

Documentation is updated! I didn't provide examples, but I did originally make changes to App.vue to 'test' and demonstrate reactivity (not sure if that will affect the codepen). Is that good enough for now?

@rcarcasses
Copy link
Owner

Sounds fantastic! Just a comment: perhaps in the future it is convenient to rewrite the logic using proxy objects' api as in the upcoming version 3 of vue. I have this in plan but I haven't found a slot in time to do it. Anyway your work is more than appreciated, thanks once more!

@rcarcasses rcarcasses merged commit 84cfe18 into rcarcasses:master Nov 15, 2019
@rcarcasses
Copy link
Owner

package and documentation updated, you can double check it now! :)

@wfischer42
Copy link
Contributor Author

I'm not sure how proxy objects work, but I'll look into it at some point and see if I can figure it out. The changes I made so far are just the ones I need for my project at the moment (and I'll add more stuff as new requirements emerge).

Also, I just noticed that I hadn't included the 1.0.7 changelog update in the root-level readme. Just wanted to point it out.

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.

2 participants