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

Ace editor widget is not showing up when used inline inside jupyter #1597

Open
kumaranvpl opened this issue Sep 21, 2020 · 2 comments
Open
Labels
type: bug Something isn't correct or isn't working

Comments

@kumaranvpl
Copy link

I am trying to build a set of panels which can be viewed inline inside jupyter notebook itself. But when I use the ace editor widget it is not showing up inline in jupyter notebook

ALL software version info

jupyter==1.0.0
panel==0.10.0a18
param==1.9.3

Description of expected behavior and the observed behavior

Expected Behavior: Both string param and ace editor needs to show up inline
Observed Behavior: Nothing shows up except markdown widget. But if I disable editor then param shows up correctly.

Complete, minimal, self-contained example code that reproduces the issue

# Test this code in a jupyter notebook
import param
import panel as pn
pn.extension("ace")

class testHandleYAML(param.Parameterized):
    editor = pn.widgets.Ace(
        value="""
        key_X: Y
        key_Z:
            key1: value1
            key2: value2
        """, 
        language="yaml", sizing_mode="stretch_both", height=1200, width=500
    )
    something = param.String("some value")
    

    def __init__(self):
        super(testHandleYAML, self).__init__()
    
    def panel_view(self) -> pn.viewable.Layoutable:
        return pn.Column(
                pn.pane.Markdown("""### YAML Config""", width=800),
                self.editor, # comment this line and the below param will show up
                self.param.something
            )

    def panel(self) -> pn.viewable.Layoutable:
        return self.panel_view()
    

stage1 = testHandleYAML()
stage1.panel()

Screenshots or screencasts of the bug in action

  1. When editor is enabled only markdown widget is showing up
    Screenshot from 2020-09-21 20-46-13
  2. When editor is disabled then the param string is showing up correctly
    Screenshot from 2020-09-21 20-46-38
@MarcSkovMadsen
Copy link
Collaborator

Are there any error messages in the browser console? (Use CTRL+Shift+I to see them)

@kumaranvpl
Copy link
Author

@MarcSkovMadsen Yes, there is an error in console. It is thrown by require.js. Following is the error thrown

Uncaught (in promise) Error: Module name "ace/ext/modelist" has not been loaded yet for context: _ http://requirejs.org/docs/errors.html#notloaded at makeError (require.js?v=951f856e81496aaeec2e71a1c2c0d51f:168) at Object.localRequire [as require] (require.js?v=951f856e81496aaeec2e71a1c2c0d51f:1433) at d.render (eval at append_javascript (outputarea.js:763), <anonymous>:1041:1341) at u.render (eval at append_javascript (outputarea.js:763), <anonymous>:577:1843) at u.build (eval at append_javascript (outputarea.js:763), <anonymous>:577:2453) at u.renderTo (eval at append_javascript (outputarea.js:763), <anonymous>:577:2406) at r (eval at append_javascript (outputarea.js:763), <anonymous>:700:443) at async Object.t.add_document_standalone (eval at append_javascript (outputarea.js:763), <anonymous>:700:509)

@philippjfr philippjfr added the type: bug Something isn't correct or isn't working label Oct 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't correct or isn't working
Projects
None yet
Development

No branches or pull requests

3 participants