Skip to content

Comments

fix: Fixed missing data in pdf#4009

Merged
JamalAlabdullah merged 3 commits intomainfrom
17674-missing-data-in-generated-pdf
Feb 20, 2026
Merged

fix: Fixed missing data in pdf#4009
JamalAlabdullah merged 3 commits intomainfrom
17674-missing-data-in-generated-pdf

Conversation

@JamalAlabdullah
Copy link
Contributor

@JamalAlabdullah JamalAlabdullah commented Feb 18, 2026

Description

Related Issue(s)

NOTE:

  • The un-passed test is not related to the changes that made in this PR, I will check

  • Missing data is fixed , but i noticed that there is error in order in som places not in all. I am not sure if this is an error and we need to create PR for it?

  • closes #17674

After:

Screen.Recording.2026-02-18.at.15.54.31.mov

Verification/QA

  • Manual functionality testing
    • I have tested these changes manually
    • Creator of the original issue (or service owner) has been contacted for manual testing (or will be contacted when released in alpha)
    • No testing done/necessary
  • Automated tests
    • Unit test(s) have been added/updated
    • Cypress E2E test(s) have been added/updated
    • No automatic tests are needed here (no functional changes/additions)
    • I want someone to help me make some tests
  • UU/WCAG (follow these guidelines until we have our own)
    • I have tested with a screen reader/keyboard navigation/automated wcag validator
    • No testing done/necessary (no DOM/visual changes)
    • I want someone to help me perform accessibility testing
  • User documentation @ altinn-studio-docs
    • Has been added/updated
    • No functionality has been changed/added, so no documentation is needed
    • I will do that later/have created an issue
  • Support in Altinn Studio
    • Issue(s) created for support in Studio
    • This change/feature does not require any changes to Altinn Studio
  • Sprint board
    • The original issue (or this PR itself) has been added to the Team Apps project and to the current sprint board
    • I don't have permissions to do that, please help me out
  • Labels
    • I have added a kind/* and backport* label to this PR for proper release notes grouping
    • I don't have permissions to add labels, please help me out

Summary by CodeRabbit

  • Style
    • Adjusted PDF view styling to prevent content from being clipped; improves on-screen display and printing of PDF documents.

@JamalAlabdullah JamalAlabdullah linked an issue Feb 18, 2026 that may be closed by this pull request
@JamalAlabdullah JamalAlabdullah added backport-ignore This PR is a new feature and should not be cherry-picked onto release branches kind/bug Something isn't working labels Feb 18, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 18, 2026

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

Removed a previously present overflow: hidden declaration from the .pdf-wrapper rule in PDFView.module.css; no other CSS rules were modified.

Changes

Cohort / File(s) Summary
PDF wrapper CSS
src/features/pdf/PDFView.module.css
Removed overflow: hidden from the .pdf-wrapper selector; all other rules in the file remain unchanged.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is vague and generic, using 'fixed' without specifying what was actually changed in the CSS file or how the PDF data issue was resolved. Clarify the title to describe the specific fix, such as 'fix: Remove overflow hidden from PDF wrapper' or 'fix: Resolve PDF rendering by adjusting wrapper overflow property'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The description is mostly complete with manual testing confirmed and appropriate checkboxes marked, but lacks technical detail about the actual CSS change and contains unclear notes about unrelated test failures and potential ordering issues.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 17674-missing-data-in-generated-pdf

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/features/pdf/PDFView.module.css (1)

37-41: LGTM — the @media print override correctly unblocks clipped content in generated PDFs.

The placement inside @media print (rather than scoping overflow: hidden to @media screen) is the right call given the Cypress caveat documented in lines 2–5: keeping the base rule unscoped ensures Cypress still exercises the hidden-overflow state.

As an optional alternative, if the Cypress limitation is ever resolved, the two rules could be collapsed into a single @media screen declaration:

♻️ Optional future refactor (only if Cypress gains `@media` print support)
 .pdf-wrapper {
   /* Hide interactive elements from PDF
    * This makes testing easier as cypress does not support rendering in `@media` print mode
    * `@see` https://github.com/cypress-io/cypress/issues/790
    */
   & button,
   & [role='button'] {
     display: none !important;
   }
-  overflow: hidden;
 }

+@media screen {
+  .pdf-wrapper {
+    overflow: hidden;
+  }
+}
+
 `@media` print {
-  .pdf-wrapper {
-    overflow: visible;
-  }
-
   .hideInPrint {
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/features/pdf/PDFView.module.css` around lines 37 - 41, The `@media` print
rule for .pdf-wrapper is correct and requires no change—keep the overflow:
visible override inside the `@media` print block (refer to .pdf-wrapper and `@media`
print in PDFView.module.css); only consider collapsing into a single `@media`
screen rule in the future if Cypress gains `@media` print support, otherwise leave
as-is.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/features/pdf/PDFView.module.css`:
- Around line 37-41: The `@media` print rule for .pdf-wrapper is correct and
requires no change—keep the overflow: visible override inside the `@media` print
block (refer to .pdf-wrapper and `@media` print in PDFView.module.css); only
consider collapsing into a single `@media` screen rule in the future if Cypress
gains `@media` print support, otherwise leave as-is.

@JamalAlabdullah JamalAlabdullah moved this to 🔎 In review in Team Altinn Studio Feb 18, 2026
@JamalAlabdullah JamalAlabdullah added the squad/utforming Issues that belongs to the named squad. label Feb 18, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 18, 2026

Caution

Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted.

Error details
{"name":"HttpError","status":401,"request":{"method":"PATCH","url":"https://api.github.com/repos/Altinn/app-frontend-react/issues/comments/3920830990","headers":{"accept":"application/vnd.github.v3+json","user-agent":"octokit.js/0.0.0-development octokit-core.js/7.0.6 Node.js/24","authorization":"token [REDACTED]","content-type":"application/json; charset=utf-8"},"body":{"body":"<!-- This is an auto-generated comment: summarize by coderabbit.ai -->\n<!-- walkthrough_start -->\n\n<details>\n<summary>📝 Walkthrough</summary>\n\n## Walkthrough\n\nA print-specific CSS override is added to `PDFView.module.css` that sets the `.pdf-wrapper` element to `overflow: visible` within a `@media print` declaration, reversing the prior hidden overflow behavior specifically for print contexts.\n\n## Changes\n\n|Cohort / File(s)|Summary|\n|---|---|\n|**Print styling override** <br> `src/features/pdf/PDFView.module.css`|Added `@media print` rule to set `.pdf-wrapper` overflow to visible, enabling overflow display during printing.|\n\n## Estimated code review effort\n\n🎯 2 (Simple) | ⏱️ ~5 minutes\n\n</details>\n\n<!-- walkthrough_end -->\n\n\n<!-- pre_merge_checks_walkthrough_start -->\n\n<details>\n<summary>🚥 Pre-merge checks | ✅ 2 | ❌ 1</summary>\n\n### ❌ Failed checks (1 warning)\n\n|     Check name    | Status     | Explanation                                                                                                                                                                                 | Resolution                                                                                                                                                                                         |\n| :---------------: | :--------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| Description check | ⚠️ Warning | The pull request description is incomplete. It lacks a non-technical summary of changes, contains only a video link instead of written details, and is missing key verification checkboxes. | Add a detailed written description of the changes (not just a video), fill in the Related Issue field properly, and mark all completed verification/QA checkboxes to accurately reflect work done. |\n\n<details>\n<summary>✅ Passed checks (2 passed)</summary>\n\n|     Check name     | Status   | Explanation                                                                                                                                           |\n| :----------------: | :------- | :---------------------------------------------------------------------------------------------------------------------------------------------------- |\n|     Title check    | ✅ Passed | The title accurately reflects the main change: removing overflow styling from the PDF wrapper in print mode, which aligns with the code modification. |\n| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.                                            |\n\n</details>\n\n<sub>✏️ Tip: You can configure your own custom pre-merge checks in the settings.</sub>\n\n</details>\n\n<!-- pre_merge_checks_walkthrough_end -->\n\n<!-- finishing_touch_checkbox_start -->\n\n<details>\n<summary>✨ Finishing Touches</summary>\n\n- [ ] <!-- {\"checkboxId\": \"7962f53c-55bc-4827-bfbf-6a18da830691\"} --> 📝 Generate docstrings\n<details>\n<summary>🧪 Generate unit tests (beta)</summary>\n\n- [ ] <!-- {\"checkboxId\": \"f47ac10b-58cc-4372-a567-0e02b2c3d479\", \"radioGroupId\": \"utg-output-choice-group-unknown_comment_id\"} -->   Create PR with unit tests\n- [ ] <!-- {\"checkboxId\": \"07f1e7d6-8a8e-4e23-9900-8731c2c87f58\", \"radioGroupId\": \"utg-output-choice-group-unknown_comment_id\"} -->   Post copyable unit tests in a comment\n- [ ] <!-- {\"checkboxId\": \"6ba7b810-9dad-11d1-80b4-00c04fd430c8\", \"radioGroupId\": \"utg-output-choice-group-unknown_comment_id\"} -->   Commit unit tests in branch `17674-missing-data-in-generated-pdf`\n\n</details>\n\n</details>\n\n<!-- finishing_touch_checkbox_end -->\n\n<!-- tips_start -->\n\n---\n\nThanks for using [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=Altinn/app-frontend-react&utm_content=4009)! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.\n\n<details>\n<summary>❤️ Share</summary>\n\n- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)\n- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)\n- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)\n- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)\n\n</details>\n\n<sub>Comment `@coderabbitai help` to get the list of available commands and usage tips.</sub>\n\n<!-- tips_end -->\n\n<!-- internal state start -->\n\n\n<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEYDEZyAAUASpETZWaCrKPR1AGxJcAZvAAeXDYkzPhS9GGUPh74AO4oWNy0PpCxVNzclJCQBgByjgKUXAAsAAylAJzZBgCqNgAyXLC4uNyIHAD0HUTqsNgCGkzMHQCCHuIYGB1oGWA+FPgYNBi0YBQkaGId3NgeHh1lldU1iEWQAFJozGgeYyq0ux5osNUAyvjYFAwkkAJUGAxYFwAIwAdgAbKDimBmEhEPAMEQwLRqGgwAjiGRlDRVkkUoAkwhgzlIuF+/0BXGuCLeuGo2Ha/EyWBy9RUJA8DIA1gjaB0BNgiAAaX6bTncfAUXDoogYCU/HIAYXW1Do6E4kAATKUNeCwNqwMCABzQSocADM4I4AFZwQAtIwAEWkDAo8G44kWXFwsB+tgA5MhxLgvOgVgpWOpkDz4AwVehGLBMKRIOtQhIEUR+FIKNE4gl41YHQAxVLpTIUDQwH0JBgebBKei2SA0ZjcJ40FDIXjSdi/PAKJbaDDIWWQDwIzmquHYH4YApZTD0UeITIMeB+BgKJT8Pg0RCkpS0+AcysANUo65j1Hgiw6AEURgnRJzx/uUC3kM4ft3Tkt896fhbNs435UlZXIdB1kga4KEneg0GQIY2xIHFK1yfBIHpLJaHwBhH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ANSTYqKCWg2DEoEOKMUcE1WKhWgEMUBgxQfCGgu8CUoHWSoCDQJvcbtBQQCCa59ubQTcKBsRHKytJBEZLEoKyliKo7GyN5QYNHZ86okCEZQURKzgG8OWr/K++B/7cG6qcCBKrsdSOgQ9AwsiukIUyxTugIxcDBHTGA2g5jpKSTCbgTRpQMfE56mT1nVOVQ8LDPoIAA -->\n\n<!-- internal state end -->"},"request":{"retryCount":1}},"response":{"url":"https://api.github.com/repos/Altinn/app-frontend-react/issues/comments/3920830990","status":401,"headers":{"access-control-allow-origin":"*","access-control-expose-headers":"ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset","connection":"close","content-security-policy":"default-src 'none'","content-type":"application/json; charset=utf-8","date":"Wed, 18 Feb 2026 15:00:59 GMT","referrer-policy":"origin-when-cross-origin, strict-origin-when-cross-origin","server":"github.com","strict-transport-security":"max-age=31536000; includeSubdomains; preload","vary":"Accept-Encoding, Accept, X-Requested-With","x-content-type-options":"nosniff","x-frame-options":"deny","x-github-media-type":"github.v3; format=json","x-github-request-id":"0814:13D094:533EB62:16A71CA8:6995D42B","x-xss-protection":"0"},"data":{"message":"Bad credentials","documentation_url":"https://docs.github.com/rest","status":"401"}}}

@JamalAlabdullah JamalAlabdullah changed the title fix: Removed overflow in pdf wrapper fix: Fixed missing data in pdf Feb 19, 2026
@sonarqubecloud
Copy link

@JamalAlabdullah JamalAlabdullah moved this from 🔎 In review to 🧪 Test in Team Altinn Studio Feb 20, 2026
@JamalAlabdullah JamalAlabdullah merged commit 09973ba into main Feb 20, 2026
15 of 16 checks passed
@JamalAlabdullah JamalAlabdullah deleted the 17674-missing-data-in-generated-pdf branch February 20, 2026 12:59
@github-project-automation github-project-automation bot moved this from 🧪 Test to ✅ Done in Team Altinn Studio Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-ignore This PR is a new feature and should not be cherry-picked onto release branches kind/bug Something isn't working squad/utforming Issues that belongs to the named squad.

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Missing data in generated PDF

3 participants