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

Explicit Ajax helpers for new response types #4440

Merged
merged 6 commits into from
Dec 22, 2020
Merged

Explicit Ajax helpers for new response types #4440

merged 6 commits into from
Dec 22, 2020

Conversation

sculpt0r
Copy link
Contributor

What is the purpose of this pull request?

New feature - according to #4394

Does your PR contain necessary tests?

All patches that change the editor code must include tests. You can always read more
on PR testing,
how to set the testing environment and
how to create tests
in the official CKEditor documentation.

This PR contains

  • Unit tests
  • Manual tests

Did you follow the CKEditor 4 code style guide?

Your code should follow the guidelines from the CKEditor 4 code style guide which helps keep the entire codebase consistent.

  • PR is consistent with the code style guide

What is the proposed changelog entry for this pull request?

* [#4394 ](/~https://github.com/ckeditor/ckeditor4/issues/4394): Added ajax predefined loading methods for: binary - `loadBinary` and text - `loadText`.

What changes did you make?

Give an overview…

Added two methods:

  • loadText
  • loadBinary
    based on the current load method.

Rename ajax load methods in tests. For those called load with rsponseType set to 'text' or 'arraybuffer' - I replace them with newly created loadText and loadBinary. Since it's a new API with predefined responseType - tests can be based on the newest changes. Also, add issue markers for tests based on loadText and loadBinary.

Which issues does your PR resolve?

Closes #4394

@f1ames f1ames self-requested a review December 16, 2020 10:54
@f1ames f1ames self-assigned this Dec 16, 2020
Copy link
Contributor

@f1ames f1ames left a comment

Choose a reason for hiding this comment

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

Just one clarification regarding unit tests.

tests/plugins/ajax/ajax.js Show resolved Hide resolved
@sculpt0r sculpt0r requested a review from f1ames December 16, 2020 23:03
@f1ames f1ames self-assigned this Dec 21, 2020
Copy link
Contributor

@f1ames f1ames left a comment

Choose a reason for hiding this comment

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

LGTM 👍


One note regarding docs and custom @params - now you will see that building docs show a warning about "unknown type":

image

It doesn't change the resulting docs itself (it is still shown correctly AFAIS), however it's there to say something is missing and should be fixed most probably. For such occasions we have external types definition in docs JSDuck task. I have already covered that on major branch.

@f1ames
Copy link
Contributor

f1ames commented Dec 22, 2020

Rebased onto latest major.

@f1ames f1ames merged commit 5380706 into major Dec 22, 2020
@f1ames f1ames deleted the t/4394 branch December 22, 2020 07:40
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.

Explicit Ajax helpers for new response types
2 participants