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

#9493 Add Image Button to Rich Text Editor #9513

Merged
merged 58 commits into from
Nov 14, 2024
Merged

Conversation

mnholtz
Copy link
Collaborator

@mnholtz mnholtz commented Nov 13, 2024

What does this PR do?

Discussion

  • Putting bulleted list buttons underneath the overflow menu in favor of showing the image buttton

Demo

https://www.loom.com/share/e0761bba8c0244dd98223f02a346f86b

@twschiller twschiller added this to the 2.2.0 milestone Nov 13, 2024
@twschiller twschiller added the enhancement New feature or request label Nov 13, 2024
package-lock.json Outdated Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

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

This and similar changes was required due to updating the swagger.ts

@mnholtz mnholtz marked this pull request as ready for review November 14, 2024 22:03
Comment on lines 249 to 275
axiosMock.onPost(API_PATHS.ASSET_PRE_UPLOAD(databaseId)).reply(200, {
asset: {
id: assetId,
download_url: mockDownloadUrl.href,
filename: file.name,
is_uploaded: false,
updated_at: new Date().toISOString(),
created_at: new Date().toISOString(),
},
upload_url: mockUploadUrl.href,
fields: {
key: "test-key",
policy: "test-policy",
},
});

axiosMock.onPost(mockUploadUrl.href).reply(200);

// Mock the asset update request
axiosMock.onPatch(API_PATHS.ASSET(databaseId, assetId)).reply(200, {
id: assetId,
download_url: mockDownloadUrl.href,
filename: file.name,
is_uploaded: true,
updated_at: new Date().toISOString(),
created_at: new Date().toISOString(),
});
Copy link
Collaborator

Choose a reason for hiding this comment

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

NIT:

Suggested change
axiosMock.onPost(API_PATHS.ASSET_PRE_UPLOAD(databaseId)).reply(200, {
asset: {
id: assetId,
download_url: mockDownloadUrl.href,
filename: file.name,
is_uploaded: false,
updated_at: new Date().toISOString(),
created_at: new Date().toISOString(),
},
upload_url: mockUploadUrl.href,
fields: {
key: "test-key",
policy: "test-policy",
},
});
axiosMock.onPost(mockUploadUrl.href).reply(200);
// Mock the asset update request
axiosMock.onPatch(API_PATHS.ASSET(databaseId, assetId)).reply(200, {
id: assetId,
download_url: mockDownloadUrl.href,
filename: file.name,
is_uploaded: true,
updated_at: new Date().toISOString(),
created_at: new Date().toISOString(),
});
axiosMock.onPost(API_PATHS.ASSET_PRE_UPLOAD(databaseId)).reply(200, {
asset: {
id: assetId,
download_url: mockDownloadUrl.href,
filename: file.name,
is_uploaded: false,
updated_at: new Date().toISOString(),
created_at: new Date().toISOString(),
},
upload_url: mockUploadUrl.href,
fields: {
key: "test-key",
policy: "test-policy",
},
}).onPost(mockUploadUrl.href)
.reply(200)
// Mock the asset update request
.onPatch(API_PATHS.ASSET(databaseId, assetId)).reply(200, {
id: assetId,
download_url: mockDownloadUrl.href,
filename: file.name,
is_uploaded: true,
updated_at: new Date().toISOString(),
created_at: new Date().toISOString(),
});

Copy link

When the PR is merged, the first loom link found on this PR will be posted to #sprint-demo on Slack. Do not edit this comment manually.

@mnholtz mnholtz merged commit 4af5865 into main Nov 14, 2024
22 checks passed
@mnholtz mnholtz deleted the feature/9493_add_image_button branch November 14, 2024 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

4 participants