Skip to content

Add viewport meta tag to index.html #360

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 1 commit into from
Mar 30, 2025
Merged

Conversation

keta1
Copy link
Contributor

@keta1 keta1 commented Mar 30, 2025

Mobile Display Optimization

Content Updates

  • Add viewport meta tag to index.html
  • Migrate styles to styles.css
  • Migrate error handling to unsupported_browser.js

Description

Fixed the display of sample on mobile

Comparison

Before After
Before After

- Migrate styles to `styles.css`.
@keta1 keta1 changed the title Add viewport meta tag to index.html. Add viewport meta tag to index.html Mar 30, 2025
@mikepenz mikepenz requested a review from Copilot March 30, 2025 16:24
@mikepenz mikepenz added the other label Mar 30, 2025
Copy link
Contributor

@Copilot 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 optimizes mobile display by adding a viewport meta tag, migrating styles to a dedicated stylesheet, and centralizing error handling for unsupported browsers into a new JavaScript file.

  • Introduce error handling for unsupported browsers that addresses specific WebAssembly compilation issues.
  • Migrate error handling logic to a new file (unsupported_browser.js).
Files not reviewed (2)
  • sample/web/src/commonMain/resources/index.html: Language not supported
  • sample/web/src/commonMain/resources/styles.css: Language not supported

Comment on lines +3 to +4
document.getElementById("warning").style.display = "initial";

Copy link
Preview

Copilot AI Mar 30, 2025

Choose a reason for hiding this comment

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

Add a null check for the element with id 'warning' before modifying its style to prevent potential runtime errors.

Suggested change
document.getElementById("warning").style.display = "initial";
const warningElement = document.getElementById("warning");
if (warningElement != null) {
warningElement.style.display = "initial";
}

Copilot uses AI. Check for mistakes.

@mikepenz mikepenz merged commit d58406c into mikepenz:develop Mar 30, 2025
2 checks passed
@keta1 keta1 deleted the fix/web branch March 30, 2025 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants