Skip to content

Improve typings for events and update project demo #244

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

Merged
merged 10 commits into from
Mar 29, 2023
Merged

Conversation

filipsobol
Copy link
Member

@filipsobol filipsobol commented Mar 21, 2023

Suggested merge commit message (convention)

Feature: Improve typings for events emitted by the Vue component.

Internal: Add Vue linter and apply suggestions.

Internal: Update demo project to better reflect real-world usage. Closes ckeditor/ckeditor5#13545.

MAJOR BREAKING CHANGE: Integration now requires Editor version 37 or later.

@filipsobol filipsobol requested review from pomek and psmyrek March 21, 2023 10:29
@coveralls
Copy link

coveralls commented Mar 21, 2023

Pull Request Test Coverage Report for Build 459

  • 13 of 13 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 451: 0.0%
Covered Lines: 44
Relevant Lines: 44

💛 - Coveralls

Copy link
Contributor

@psmyrek psmyrek left a comment

Choose a reason for hiding this comment

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

I noticed a few problems while checking the PR.

  1. If I understand correctly, yarn dev and yarn build commands in the demo app will build the component from the root path '../' (not from npm). If so, the develop command is no longer needed in the main package.json. On the other hand, we build the production version for npm using webpack. Now we don't have a sample app in this repository that would verify if what webpack produces still works. For example, the demo app built with vite might work, but not with webpack.

  2. In the demo app, the yarn dev command works fine. The yarn build command failed:

    obraz

    Do you know this? What could be the reason?

  3. After migrating to yarn, the demo app still contains package-lock.json and there are also other references to npm, e.g. in the README.md.

@filipsobol
Copy link
Member Author

If I understand correctly, yarn dev and yarn build commands in the demo app will build the component from the root path '../' (not from npm). If so, the develop command is no longer needed in the main package.json. On the other hand, we build the production version for npm using webpack. Now we don't have a sample app in this repository that would verify if what webpack produces still works. For example, the demo app built with vite might work, but not with webpack.

Vite will not build the component from source, but will use code compiled by Webpack. The path file:.. in demo/package.json uses the similar mechanisms as a "normal" npm installation.

You can test this by removing the dist folder in the root and reinstalling the dependencies in demo. Unfortunately, reinstallation is necessary because we are using file: instead of link: due to problems with using link in Vite.

In the demo app, the yarn dev command works fine. The yarn build command failed:
Do you know this? What could be the reason?

Fixed.

After migrating to yarn, the demo app still contains package-lock.json and there are also other references to npm, e.g. in the README.md.

Updated.

@filipsobol filipsobol requested a review from psmyrek March 27, 2023 09:07
Copy link
Member

Choose a reason for hiding this comment

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

As I am not in the process, I do not understand why we have two samples:

  1. sample/
  2. demo/

I can guess that the first is just a sample using the component and some CKEditor 5 build, while the second is a demo application (more realistic scenario). It would be good to describe both in README and explain which should be checked before releasing a new version. Maybe we do not need the sample/ directory anymore. Instead, we should develop example applications that could be checked using E2E tests on CI.

Copy link
Member Author

@filipsobol filipsobol Mar 28, 2023

Choose a reason for hiding this comment

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

This PR removes the demo in the sample folder, so we only have the one in the demo folder.

I updated the README to include information on how to run the new demo before releasing a new version.

I also added a new CI script that will build the demo project.

Any more sophisticated tests will require more work and are probably beyond the scope of this PR. Any thoughts?

@filipsobol filipsobol force-pushed the ck/13545-add-vue-poc branch from b76acb5 to 3c7cffa Compare March 28, 2023 11:55
Copy link
Contributor

@psmyrek psmyrek left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

@filipsobol filipsobol requested a review from pomek March 28, 2023 12:39
Copy link
Member

@pomek pomek left a comment

Choose a reason for hiding this comment

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

LGTM.

@pomek pomek merged commit 3395eb0 into master Mar 29, 2023
@pomek pomek deleted the ck/13545-add-vue-poc branch March 29, 2023 06:35
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.

[TS] PoC of using types in Vue integration
4 participants