-
-
Notifications
You must be signed in to change notification settings - Fork 416
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
chalkboard redeux #355
chalkboard redeux #355
Conversation
This is super @parmentelat! Thanks for doing it. Will try to provide feedback in the next few days. |
One last note, I forgot to mention that the original PR by @superbobry introduced more separation of styling from js into css, that I liked, but have had no time to reproduce here, and that would still be worth doing IMO |
Let's finish #344 before doing a review of this one, so I do not review the same thing twice (also difficult to see the real changes because of the noise from the other PR). It should be straightforward to make the npm package. It should be just a matter to add the proper package.json and you are done. Let me know if you need help with this. After that we can download the chalkboard from npm and we do not need to ship additional code. Btw, there are really interesting plugins out there... I did not have time to check them but some of them are really nice, ie the menubar plugin... |
Agreed, I opened this issue with the original author a few days back feel free to elaborate on this issue directly, it would be more optimal if done natively at the source :) |
In addition, going back to the "let's put this in standby" arguments, I wanted to add this Right now the code kind of works but it's supoptimal, in particular it behaves very poorly with input keyboard events that are defined both in the chalkboard and in the jupyter workd it just occurred to me that one way to go about that problem would maybe to have these keyboard events managed by jupyter too. just an idea for now, but I'll try to give this a shot if/when I have a chance |
Thanks, will try to put some comments there if we don't see actions.
Sounds like a good idea. |
as requested: this PR should now only show the relevant changes; hopefully at least ;) |
As a summary / status on this one, two topics are still unsettled
|
I just submitted a PR with the original chalkboard plugin that aims at publishing the chalkboard plugin under npm, and I published a test version that is available here https://www.npmjs.com/package/reveal.js-chalkboard If the original author is willing to follow up on that, it would mean that I can completely review/simplify the way this PR installs the plugin |
with the assumption that reveal.js-chalkboard is available at npmjs.com, and so without the need to duplicate the plugins code in this repo
I have rebased my branch so as to get rid of the addition of the plugin code keyboard events management remains as the one issue that is left |
Amazing! Thanks!!
Do you want to work on that before I look into review this one? |
well, ideally yes, but honestly my priorities about this one PR have dropped a little; so maybe it's best if you take a look at what we have right now already. |
That's ok, I will try to review it soon. We can leave the keyboard thing as an enhancement for later, if it is necessary. |
package.json
Outdated
"build-reveal": "cp -r ./node_modules/reveal.js rise/static/reveal.js", | ||
"reset-reveal": "sed -i.upstream '11 s_^_\/*_' rise/static/reveal.js/css/reveal.css", | ||
"build-reveal": "for dep in reveal.js reveal.js-chalkboard; do cp -r ./node_modules/$dep rise/static/$dep; done", | ||
"reset-reveal": "sed -i.upstream '11 s_^_/*_' rise/static/reveal.js/css/reveal.css", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a missing backslash on this line, are you testing this with OSX, right?
I would prefer to keep the backslash because it is harmless for OSX and I have tested successfully on linux, in the past...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eventually, we can use the reveal_rise
package I created for the upcoming jupyterlab_rise, ref #381 (comment) to provide the proper CSS and get rid of this hack...
rise/static/main.js
Outdated
options.dependencies.push({ src: require.toUrl('./reveal.js/plugin/chalkboard/chalkboard.js'), async: true }); | ||
// xxx need to explore the option of registering jupyter actions | ||
// and have jupyter handle the keyboard entirely instead of this approach | ||
// could hopefully avoid conflicting behaviours in case of overlaps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense for later...
rise/static/main.js
Outdated
110: function() { RevealChalkboard.toggleNotesCanvas() }, // 'N' toggle notes (slide-local) | ||
68: function() { RevealChalkboard.download() }, // 'D' download recorded chalkboard drawing | ||
100: function() { RevealChalkboard.download() }, // 'd' download recorded chalkboard drawing | ||
// when 'd' is pressed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not understand this comment...
} | ||
|
||
|
||
Reveal.initialize(options); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remind me why you are using initialize
here instead of configure
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a point that the original author had pointed out, so in his own words:
Reveal.configure
does not load dependencies
@@ -663,32 +705,18 @@ define([ | |||
var help_button = $('<i/>') | |||
.attr('id','help_b') | |||
.attr('title','Reveal Shortcuts Help') | |||
.addClass('fa-question fa-4x fa') | |||
.addClass('fa-question fa-3x fa') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you changing the size here? Smaller things fit better with the chalkboard stuff?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC, yes that's the spirit, there are new buttons related to chalkboard, so this looked better, but it's clearly a matter of taste, feel free to undo of course
|
||
/* use !important to override stuff that | ||
would normally be configured through | ||
chalkboard options */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And why you can't configure them using the chalkboard options? Because you use a set of config options by default and there is not an easy way to access the chalkboard config mechanism?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again it's been a long time so I'm not 100% positive here
IIRC since we load the chalkboard extension as-is, it comes with settings in its own css, but we want to override these, hence !important
@parmentelat, I left some comments. |
# Conflicts: # package.json # rise/static/main.js
merge has been done; see also my answers to your comments |
That's the plan, but I felt I needed to provide you with feedback on this one after a long time without review from me. |
@parmentelat I did some updates and PR'ed against your branch: https://github.com/parmentelat/RISE/pull/1. If you can review my changes and test it, that would be awesome. Thanks!! |
Closing in favor of #408. |
This is a redeux for #226
Many notes though:
Reveal.initialize()
vsReveal.configure()
because, as he pointed out, dependencies are not applied when using the latter. And this btw has an impact on loading the notes plugin as wellnpm install
; this needs to be double checked as I am far from an expert here. So I ship this as part of our our repo - I refrained from using git subtrees here - but in the newreveal-plugins
subdir, and not inrise/static/reveal.js
which is an area automatically built.npm run build
is convenience that redoes everything (exceptnpm install
, and maybe I was wrong here)The remaining issues are documented in the last commit; I have not yet reached the point where I could apply superbobry's cool idea of putting more stuff in css from js, will probably be needed later on to address the overlapping issues.
But I am getting too far apart and am running out of time, so I feel it's best to make a stop here.