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

Layout options widgets #24

Merged
merged 9 commits into from
Oct 27, 2020
Merged

Layout options widgets #24

merged 9 commits into from
Oct 27, 2020

Conversation

dfreeman06
Copy link
Contributor

@dfreeman06 dfreeman06 commented Oct 22, 2020

#19

  • Add ability to set layout options for XELK Transformer networkx nodes.
  • Add ability to set css classes for XELK Transformer networkx nodes.

@dfreeman06 dfreeman06 requested a review from nrbgt October 22, 2020 15:22
@nrbgt nrbgt mentioned this pull request Oct 27, 2020
6 tasks
"\n",
"elk_app.transformer.css_classes = {\n",
" \"n1\": {\n",
" ElkNode: set([\"example-custom-class\"]),\n",
Copy link
Contributor

Choose a reason for hiding this comment

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

As discussed, using classes as keys kinds freaks me out...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Created new issue to track #31.

"- [🦌 ELK App 🚀](./03_App.ipynb)\n",
"- [🦌 Interactive ELK App 🕹️](./04_Interactive.ipynb)\n",
"- [🦌 Node Label Placement 🏷️](./100_node_label_placement.ipynb)\n",
"- [🦌 Text Sizer 📏](./101_text_sizer.ipynb)"
Copy link
Contributor

Choose a reason for hiding this comment

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

re #28: we could have a table of contents that we just import instead of keeping this up-to-date

inline = T.Bool(default_value=False)

def _ui(self) -> List[W.Widget]:
cb = W.Checkbox(description="Inline Edge Labels")
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps we hoist the description to a static on the class... or standardize on

class FooBarBaz(LayoutOptionWidget):
  """ Foo Bar Baz
        first you foo, then you bar in order to baz
  """
   def _ui(self) -> List[W.Widget]:
        cb = W.Checkbox(description=self.__doc__.splitlines()[0].trim())

@nrbgt
Copy link
Contributor

nrbgt commented Oct 27, 2020

Going to try out merging this into #27 and will do interactive review from there...

"metadata": {},
"outputs": [],
"source": [
"l = ipyelk.nx.XELKTypedLayout()"
Copy link
Contributor

@nrbgt nrbgt Oct 27, 2020

Choose a reason for hiding this comment

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

lowercase L is a singularly bad variable name, along with O

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed this and added some other minor wording cleanup to that example notebook. I created a followon issue for more examples and the importnb PR should be there.

@nrbgt
Copy link
Contributor

nrbgt commented Oct 27, 2020

From a code perspective, it looks fine, if somewhat hard to grasp... however, there's almost no way I'd be able to look at the docs and actually make one of these custom thingers work. I think refining a few, targeted examples, for e.g. the edge collapsing, would be helpful... linking to the source is fine.

"cell_type": "markdown",
"metadata": {},
"source": [
"# 🦌 ELK Transformer 🤖\n",
Copy link
Contributor

Choose a reason for hiding this comment

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

Needs more descriptive title, and less copy-pasta...

@nrbgt
Copy link
Contributor

nrbgt commented Oct 27, 2020

#27 appears to track the updates from the layout options well... kinda hard to show at present, and won't bother with until #28 (which i've started tinkering with), but gets my approval!

@nrbgt nrbgt mentioned this pull request Oct 27, 2020
12 tasks
@dfreeman06 dfreeman06 linked an issue Oct 27, 2020 that may be closed by this pull request
@dfreeman06 dfreeman06 merged commit 5f84dbe into master Oct 27, 2020
@nrbgt nrbgt mentioned this pull request Oct 30, 2020
20 tasks
@dfreeman06 dfreeman06 deleted the layout_options_widgets branch January 21, 2021 18:04
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.

XELK Layout Option Controls
2 participants