Skip to content

add error message style#17

Merged
nielthiart merged 1 commit intomainfrom
error-styles
May 30, 2025
Merged

add error message style#17
nielthiart merged 1 commit intomainfrom
error-styles

Conversation

@nielthiart
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings May 30, 2025 20:49
@nielthiart nielthiart merged commit a38277b into main May 30, 2025
1 check passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a CSS class to the error message container to enable styling.

  • Assigns error-message class to the dynamically created error <div>.
Comments suppressed due to low confidence (1)

src/controllers/qr-code-controller.ts:167

  • Add or update a unit/integration test to verify that the error <div> is rendered with the error-message class when an error occurs.
errorDiv.className = 'error-message';

// Clear container and create error message safely
this.elements.container.innerHTML = '';
const errorDiv = document.createElement('div');
errorDiv.className = 'error-message';
Copy link

Copilot AI May 30, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider using errorDiv.classList.add('error-message') instead of setting className directly to avoid inadvertently removing any existing classes on the element.

Suggested change
errorDiv.className = 'error-message';
errorDiv.classList.add('error-message');

Copilot uses AI. Check for mistakes.
@nielthiart nielthiart deleted the error-styles branch May 31, 2025 06:30
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.

1 participant