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

Restore quick-review-comment-deletion #6018

Merged
merged 3 commits into from
Sep 25, 2022
Merged

Conversation

fregante
Copy link
Member

Test URLs

This PR

Screenshot

text2

@fregante fregante added the bug label Sep 25, 2022
@@ -2,7 +2,7 @@ import select from 'select-dom';
import oneEvent from 'one-event';

export default async function loadDetailsMenu(detailsMenu: HTMLElement): Promise<void> {
const fragment = select('include-fragment.SelectMenu-loading', detailsMenu);
const fragment = select('.js-comment-header-actions-deferred-include-fragment', detailsMenu);
Copy link
Member Author

Choose a reason for hiding this comment

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

They changed classes, so if the user never hovered the dropdown for it to preload it, the action would just silently fail

add: addDeleteButton,
});
delegate(document, '.rgh-quick-comment-edit-button', 'click', preloadDropdown, {signal});
observe('.review-comment .js-comment-cancel-button', addDeleteButton, {signal});
Copy link
Member Author

Choose a reason for hiding this comment

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

Extracted from #6006

.click();
} catch (error) {
void showToast(new Error('Feature broken. Please open an issue with the link found in the console'));
features.log.error(import.meta.url, (error as Error).message)
Copy link
Member Author

Choose a reason for hiding this comment

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

Might as well make future errors loud

gif

@fregante fregante merged commit b475acd into main Sep 25, 2022
@fregante fregante deleted the quick-review-comment-deletion branch September 25, 2022 08:46
@fregante
Copy link
Member Author

Merging because #6006 somewhat depends on this

fregante added a commit that referenced this pull request Sep 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

1 participant