fix(ui): correct CSS visibility typo; clean up spelling/grammar across codebase (#4661)

# Description of Changes

**What was changed**
- Fixed a CSS typo in `imageHighlighter.css` (`visbility` →
`visibility`) to restore the intended transition behavior.
- Corrected spelling/grammar in logs, comments, and console messages:
  - `PdfUtils.java`: log message “overlayed” → “overlaid”.
  - `CustomPDFDocumentFactoryTest.java`: comment typo “neeed” → “need”.
  - `FlattenController.java`: comment “readd” → “re-add”.
  - `PdfContainer.js`: console log “Hidding” → “Hiding”.
  - `navbar.js`: clarified tooltip comment wording.
  - `languages.html`: corrected Vietnamese label to “Tiếng Việt”.
- `ConvertWebsiteToPdfTest.java`: converted/de-duplicated comments to
clear English and improved assertion messages.
- No functional code paths altered except the CSS fix; the rest are
non-functional text improvements (logs/comments/tests/labels).

**Why the change was made**
- The CSS typo prevented the `visibility` transition from working as
intended.
- Consistent, correct wording improves developer experience, test
readability, and UI polish (language list).

---

## Checklist

### General

- [ ] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [ ] I have read the [Stirling-PDF Developer
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md)
(if applicable)
- [ ] I have read the [How to add new languages to
Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md)
(if applicable)
- [ ] I have performed a self-review of my own code
- [ ] My changes generate no new warnings

### Documentation

- [ ] I have updated relevant docs on [Stirling-PDF's doc
repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/)
(if functionality has heavily changed)
- [ ] I have read the section [Add New Translation
Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md#add-new-translation-tags)
(for new translation tags only)

### UI Changes (if applicable)

- [ ] Screenshots or videos demonstrating the UI changes are attached
(e.g., as comments or direct attachments in the PR)

### Testing (if applicable)

- [ ] I have tested my changes locally. Refer to the [Testing
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md#6-testing)
for more details.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Reece Browne <74901996+reecebrowne@users.noreply.github.com>
This commit is contained in:
Ludy 2025-11-03 17:14:44 +01:00 committed by GitHub
parent 22e34f7e85
commit 60b522f1be
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 12 additions and 12 deletions

View File

@ -567,7 +567,7 @@ public class PdfUtils {
PDImageXObject image = PDImageXObject.createFromByteArray(document, imageBytes, ""); PDImageXObject image = PDImageXObject.createFromByteArray(document, imageBytes, "");
// Draw the image onto the page at the specified x and y coordinates // Draw the image onto the page at the specified x and y coordinates
contentStream.drawImage(image, x, y); contentStream.drawImage(image, x, y);
log.info("Image successfully overlayed onto PDF"); log.info("Image successfully overlaid onto PDF");
if (!everyPage && i == 0) { if (!everyPage && i == 0) {
break; break;
} }

View File

@ -117,7 +117,7 @@ class CustomPDFDocumentFactoryTest {
} }
} }
// neeed to add password pdf // need to add password pdf
// @Test // @Test
// void testLoadPasswordProtectedPdfFromInputStream() throws IOException { // void testLoadPasswordProtectedPdfFromInputStream() throws IOException {
// try (InputStream is = getClass().getResourceAsStream("/protected.pdf")) { // try (InputStream is = getClass().getResourceAsStream("/protected.pdf")) {

View File

@ -62,7 +62,7 @@ public class FlattenController {
return WebResponseUtils.pdfDocToWebResponse( return WebResponseUtils.pdfDocToWebResponse(
document, Filenames.toSimpleFileName(file.getOriginalFilename())); document, Filenames.toSimpleFileName(file.getOriginalFilename()));
} else { } else {
// flatten whole page aka convert each page to image and readd it (making text // flatten whole page aka convert each page to image and re-add it (making text
// unselectable) // unselectable)
PDFRenderer pdfRenderer = new PDFRenderer(document); PDFRenderer pdfRenderer = new PDFRenderer(document);
PDDocument newDocument = PDDocument newDocument =

View File

@ -8,7 +8,7 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
transition: transition:
visbility 0.1s linear, visibility 0.1s linear,
background-color 0.1s linear; background-color 0.1s linear;
} }

View File

@ -731,7 +731,7 @@ class PdfContainer {
this.showButton(selectIcon, true); this.showButton(selectIcon, true);
} }
} else { } else {
console.log("Page Select off. Hidding buttons"); console.log("Page Select off. Hiding buttons");
this.showButton(selectIcon, false); this.showButton(selectIcon, false);
this.showButton(deselectIcon, false); this.showButton(deselectIcon, false);
} }

View File

@ -110,7 +110,7 @@ function tooltipSetup() {
element.addEventListener("mousemove", (event) => updateTooltipPosition(event, tooltipText)); element.addEventListener("mousemove", (event) => updateTooltipPosition(event, tooltipText));
element.addEventListener("mouseleave", hideTooltip); element.addEventListener("mouseleave", hideTooltip);
// in case UI moves and mouseleave is not triggered, tooltip is readded when mouse is moved over the element // in case UI moves and mouseleave is not triggered, the tooltip is re-added when the mouse is moved over the element
element.addEventListener("click", hideTooltip); element.addEventListener("click", hideTooltip);
}); });
}; };

View File

@ -38,7 +38,7 @@
<div th:replace="~{fragments/languageEntry :: languageEntry ('hr_HR', 'Hrvatski')}"></div> <div th:replace="~{fragments/languageEntry :: languageEntry ('hr_HR', 'Hrvatski')}"></div>
<div th:replace="~{fragments/languageEntry :: languageEntry ('no_NB', 'Norsk')}"></div> <div th:replace="~{fragments/languageEntry :: languageEntry ('no_NB', 'Norsk')}"></div>
<div th:replace="~{fragments/languageEntry :: languageEntry ('th_TH', 'ไทย')}"></div> <div th:replace="~{fragments/languageEntry :: languageEntry ('th_TH', 'ไทย')}"></div>
<div th:replace="~{fragments/languageEntry :: languageEntry ('vi_VN', 'Tiếng Việt')}"></div> <div th:replace="~{fragments/languageEntry :: languageEntry ('vi_VN', 'Tiếng Việt')}"></div>
<div th:replace="~{fragments/languageEntry :: languageEntry ('ml_IN', 'മലയാളം')}"></div> <div th:replace="~{fragments/languageEntry :: languageEntry ('ml_IN', 'മലയാളം')}"></div>
</th:block> </th:block>

View File

@ -225,8 +225,8 @@ public class ConvertWebsiteToPdfTest {
UrlToPdfRequest request = new UrlToPdfRequest(); UrlToPdfRequest request = new UrlToPdfRequest();
request.setUrlInput("https://example.com"); request.setUrlInput("https://example.com");
Path preCreatedTemp = java.nio.file.Files.createTempFile("test_output_", ".pdf"); Path preCreatedTemp = Files.createTempFile("test_output_", ".pdf");
Path htmlTemp = java.nio.file.Files.createTempFile("test_input_", ".html"); Path htmlTemp = Files.createTempFile("test_input_", ".html");
try (MockedStatic<GeneralUtils> gu = Mockito.mockStatic(GeneralUtils.class); try (MockedStatic<GeneralUtils> gu = Mockito.mockStatic(GeneralUtils.class);
MockedStatic<ProcessExecutor> pe = Mockito.mockStatic(ProcessExecutor.class); MockedStatic<ProcessExecutor> pe = Mockito.mockStatic(ProcessExecutor.class);
@ -271,12 +271,12 @@ public class ConvertWebsiteToPdfTest {
assertNotNull(resp, "Response should not be null"); assertNotNull(resp, "Response should not be null");
assertEquals(HttpStatus.OK, resp.getStatusCode()); assertEquals(HttpStatus.OK, resp.getStatusCode());
assertTrue( assertTrue(
java.nio.file.Files.exists(preCreatedTemp), Files.exists(preCreatedTemp),
"Temp file should still exist despite delete IOException"); "Temp file should still exist despite delete IOException");
} finally { } finally {
try { try {
java.nio.file.Files.deleteIfExists(preCreatedTemp); Files.deleteIfExists(preCreatedTemp);
java.nio.file.Files.deleteIfExists(htmlTemp); Files.deleteIfExists(htmlTemp);
} catch (IOException ignore) { } catch (IOException ignore) {
} }
} }