Skip to content
This repository has been archived by the owner on Feb 28, 2024. It is now read-only.

Pass in auth token #4

Closed
wants to merge 1 commit into from
Closed

Pass in auth token #4

wants to merge 1 commit into from

Conversation

pkerpedjiev
Copy link
Member

@pkerpedjiev pkerpedjiev commented Aug 21, 2023

Add the ability to pass in an auth_token via the auth_token kwarg.

Pardon the formatting. My IDE did it 😬. If it's super annoying I can submit another PR with just formatting changes. Or try to submit with the previous formatting and just the functional change.

I marked the only two lines of functional changes.

@@ -10,6 +10,8 @@ class HiGlassWidget(anywidget.AnyWidget):
_esm = pathlib.Path(__file__).parent / "widget.js"
_css = "https://esm.sh/higlass@1.12/dist/hglib.css"
_viewconf = t.Unicode("null").tag(sync=True)

auth_token = t.Unicode().tag(sync=True)
Copy link
Member Author

Choose a reason for hiding this comment

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

Functional change

Copy link
Member

@manzt manzt left a comment

Choose a reason for hiding this comment

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

Pardon the formatting. My IDE did it 😬.

Lol, no worries. We don't have any linting/formatting setup and 2 spaces over tabs is more standard in JS land.

What do we think about having an options dict (rather than a separate trait for each option):

HiGlassWidget(conf.dict(), options={"authToken": "XXXX", "theme": "dark" })

Second, since migrating to anywidget, I think its probably way nicer to move this to higlass-python? Thoughts?

@pkerpedjiev
Copy link
Member Author

Fully support 👍

@manzt manzt closed this Feb 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants