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

Added jupyterlab-toparea-text widget example. #240

Merged
merged 22 commits into from
Nov 13, 2023

Conversation

ericsnekbytes
Copy link
Contributor

@ericsnekbytes ericsnekbytes commented Jul 19, 2023

This adds the example toparea-text-widget from @jtpio's YouTube video. This example extension is a part of the JupyterLab Dual Compatibility Guide, and should be merged first before that document (as it depends on this example):

@welcome
Copy link

welcome bot commented Jul 19, 2023

Thanks for submitting your first pull request! You are awesome! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please make sure you followed the pull request template, as this will help us review your contribution more quickly.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also a intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

Copy link
Member

@fcollonval fcollonval left a comment

Choose a reason for hiding this comment

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

Thanks @ericsnekbytes

Could you add the new folder name in the following lists so it get taken into account:

Could you also clear a bit the files to align with the other examples:

  • .github folder
  • binder folder
  • CHANGELOG.md
  • LICENSE
  • RELEASE.md

I let you replace the README by some prose describing the purpose of the example (see other examples like commands or main-menu).

@ericsnekbytes
Copy link
Contributor Author

Thanks @ericsnekbytes

Could you add the new folder name in the following lists so it get taken into account:

Could you also clear a bit the files to align with the other examples:

  • .github folder
  • binder folder
  • CHANGELOG.md
  • LICENSE
  • RELEASE.md

I let you replace the README by some prose describing the purpose of the example (see other examples like commands or main-menu).

This should be done.

@ericsnekbytes
Copy link
Contributor Author

@fcollonval Can you re-review/approve this?

Copy link
Member

@fcollonval fcollonval left a comment

Choose a reason for hiding this comment

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

Thanks @ericsnekbytes

We want every examples to have integration tests to ease maintenance. Would you mind adding one?

It could be as simple as :

import { test, expect } from '@jupyterlab/galata';

test('should add a top area text', async ({ page }) => {
  await expect(page.locator('.jp-TopAreaText')).toHaveText('Hello World');
});

You can execute copier update . to rerun the extension template to generate the skeleton files for integration tests.

toparea-text-widget/README.md Outdated Show resolved Hide resolved
@ericsnekbytes
Copy link
Contributor Author

Thanks @ericsnekbytes

We want every examples to have integration tests to ease maintenance. Would you mind adding one?

It could be as simple as :

import { test, expect } from '@jupyterlab/galata';

test('should add a top area text', async ({ page }) => {
  await expect(page.locator('.jp-TopAreaText')).toHaveText('Hello World');
});

You can execute copier update . to rerun the extension template to generate the skeleton files for integration tests.

I'll add this.

@ericsnekbytes
Copy link
Contributor Author

@fcollonval If you have time to review I'd like to get this approved, the Dual Compatibility document (see top post description) depends on this example so this should be merged first. My plan now is to try to get the document and examples merged first, then do a follow-up PR for the unit tests and repo-referencing for the code snippets.

@jtpio jtpio self-requested a review October 10, 2023 15:26
https://jupyterlab.readthedocs.io/en/stable/developer/css.html
*/

/* stylelint-disable selector-class-pattern */
Copy link
Member

Choose a reason for hiding this comment

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

We need to change this rule in config (in package JSON) here and in the template as it goes against our style conventions: https://jupyterlab.readthedocs.io/en/stable/developer/css.html#css-class-naming-conventions.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We had a conversation in JupyterLab gitter and I believe Mike was okay with this, for the sake of preserving the original video tutorial's code verbatim (to reduce differences and help beginners).

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
/* stylelint-disable selector-class-pattern */

This can be removed given jupyterlab/extension-template#52, right?

Copy link
Member

@fcollonval fcollonval left a comment

Choose a reason for hiding this comment

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

Thanks @ericsnekbytes

Merging... the remaining issue is due to the JupyterLab documentation not yet available

@fcollonval fcollonval merged commit 834e87d into jupyterlab:main Nov 13, 2023
75 of 78 checks passed
Copy link

welcome bot commented Nov 13, 2023

Congrats on your first merged pull request in this project! 🎉
congrats
Thank you for contributing, we are very proud of you! ❤️

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.

3 participants