Repository navigation
fix: declare plain CSS and CSS module imports in types.d.ts - #26971
Merged
Merged
Conversation
TypeScript 6 checks side-effect imports by default, so importing a stylesheet or a CSS module from a view failed the type check. Projects whose types.d.ts still has the previous generated content are updated; customized files are left without the new declarations. Fixes #26970
Contributor
mshabarov
marked this pull request as ready for review
November 12, 2026 08:35
vaadin-review-bot
left a comment
Collaborator
There was a problem hiding this comment.
✅ Nothing to flag — the changes look good.
|
mshabarov
approved these changes
Nov 12, 2026
Contributor
|
Pull request created: #6649
|
Contributor
|
Documentation Bot: Draft documentation pull request for this change: vaadin/docsvaadin/docs#6649 Files updated:
It was written from the state of this pull request as you see it now. Please review it and mark it ready for review.
|
Collaborator
|
This ticket/PR has been released with Vaadin 25.4.0-alpha7. |
mshabarov
pushed a commit
to OriginalFelix/flow
that referenced
this pull request
Dec 1, 2026
**behavior deviation** · CI (Diagram Bot) · pull requests that get labels while or after the bot runs **Background — concurrency groups.** GitHub Actions lets one run per concurrency group be in progress; with `cancel-in-progress`, a new run in the group cancels the one in progress, and a newer pending run replaces an older pending one. Every label change on a pull request starts a Diagram Bot run, which skips its jobs unless the label is `diagram`. All these runs shared one group per pull request, so adding any other label while the bot was working cancelled the diagram it was drawing, and labels added together cancelled each other, which shows cancelled `safe_outputs` and `conclusion` jobs on the pull request. Now only `diagram` runs share a group. **Risks:** - ✅ No product code, public API, security, memory, serialization, threading, performance or migration impact. Adding `diagram` again still replaces a run in progress. **Context.** Seen on vaadin#26971, where adding `Intent Approved` two minutes after the bot started cancelled its agent job, and on vaadin#27449, where adding two `target/*` labels at once left cancelled jobs on the pull request. - The concurrency group of `diagram-bot` now ends in `diagram` for a `diagram` label and in the run id for any other label, so other label changes never share a group with a diagram run or with each other. - Recompiled `diagram-bot.lock.yml` with gh-aw v0.86.2, the version it was compiled with; only the group line changes.
peholmst
pushed a commit
to vaadin/docs
that referenced
this pull request
Dec 2, 2026
Documentation for vaadin/flow#26971 by `@totally-not-ai`[bot]. > [!NOTE] > The source pull request is merged, so this documentation describes the final > shape of the change. Please review it and mark it ready for review. **Change categories:** BEHAVIOR_CHANGE | File | Change | |------|--------| | `articles/styling/stylesheets.adoc` | Updated the CSS-module-imports paragraph: the generated `types.d.ts` now declares plain CSS and CSS module imports by default, so the page no longer instructs readers to add those declarations themselves unless their `types.d.ts` is customized. | Auto-generated by the Documentation Bot — review before merging. > Generated by [Documentation Bot](https://github.com/vaadin/flow/actions/runs/43230042316) for #26971 · agent · 59.7 AIC · ⊞ 11.7K · [◷](https://github.com/search?q=repo%3Avaadin%2Fdocs+%22gh-aw-workflow-id%3A+doc-bot%22&type=pullrequests) > - [x] expires <!-- gh-aw-expires: 2026-12-12T13:49:27.040Z --> on Dec 12, 2026, 1:49 PM UTC <!-- gh-aw-agentic-workflow: Documentation Bot, engine: claude, model: agent, id: 43230042316, workflow_id: doc-bot, run: https://github.com/vaadin/flow/actions/runs/43230042316 --> <!-- gh-aw-expires-type: pull-request --> <!-- gh-aw-workflow-id: doc-bot --> <!-- gh-aw-workflow-call-id: vaadin/flow/doc-bot -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Fixes #26970
behavior deviation · flow-build-tools · TypeScript 6 projects that import
.cssor.module.cssfiles from viewsTypeScript 6 checks side-effect imports by default, so
import './view.css'andimport styles from './view.module.css'failed the type check (TS2882, TS2307) and showed up in the dev-mode error overlay. The generatedtypes.d.tsnow declares plain CSS imports and CSS modules, as a plain Vite project's types do.Risks:
types.d.tsthat still has the previously generated content is rewritten to the new default on the next build. Customized files are not rewritten; instead a one-time info log lists the declarations to add.Context. Flow checks an existing
types.d.tsfor the declarations it requires and appends or rejects otherwise. The new declarations are optional, so they are not added to that required set: appending them to a customized file could clash with the user's own*.cssdeclarations.declare module '*.module.css'(default export of class names) anddeclare module '*.css' {}to thetypes.d.tstemplate;*.module.csscomes first because TypeScript uses the first matching pattern.types.d.ts.v3; a file matching it is replaced with the new default, and it defines the declarations a customized file must contain.*.cssget a one-time info log with the declarations to add.