jupyterlab / extension-examples

JupyterLab Extensions by Examples
BSD 3-Clause "New" or "Revised" License
439 stars 167 forks source link

Added jupyterlab-toparea-text widget example. #240

Closed ericsnekbytes closed 7 months ago

ericsnekbytes commented 11 months ago

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[bot] commented 11 months ago

Thanks for submitting your first pull request! You are awesome! :hugs:
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! :wave:
Welcome to the Jupyter community! :tada:

ericsnekbytes commented 11 months ago

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 commented 11 months ago

@fcollonval Can you re-review/approve this?

ericsnekbytes commented 11 months ago

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 commented 9 months ago

@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.

welcome[bot] commented 7 months ago

Congrats on your first merged pull request in this project! :tada: congrats Thank you for contributing, we are very proud of you! :heart: