Skip to content

chore(deps): upgrade phase 3 — FullCalendar 7, Tailwind CSS 4 - #18

Merged
Jerry-CodeHub merged 1 commit into
masterfrom
chore/deps-phase3
Sep 23, 2026
Merged

Jerry-CodeHub merged 1 commit into
masterfrom
chore/deps-phase3

Conversation

@Jerry-CodeHub

Copy link
Copy Markdown
Owner

叠加 PR:依赖 #16 → #17(按顺序合并)

背景

依赖升级 阶段 3:FullCalendar 7 与 Tailwind CSS 4。以阶段 2(chore/deps-phase2)为 base。

改动

FullCalendar 6 → 7

  • daygrid、timegrid、interaction、multimonth 四个插件包在 v7 中已删除,改从 @fullcalendar/react/* 入口导入;新增 peer 依赖 temporal-polyfill
  • v7 不再自带 CSS:改为引入 skeleton + Classic 主题(沿用 v6 的外观)+ 调色板
  • 类型改名:DateSelectArg → DateSelectInfo、EventClickArg → EventClickInfo、EventContentArg → EventDisplayInfo
  • 日历现在跟随应用的暗色主题:调色板读取祖先元素上的 data-color-scheme
  • 可见变化:
    • 日期数字不再是蓝色。v6 下它们其实是被 antd 的 <a> 链接色染蓝的
    • 列头默认不再加粗(v7 默认行为)
    • 视图切换按钮变成了 role=tab

Tailwind CSS 3 → 4(umi 4.7 经 @tailwindcss/webpack 编译)

  • 删除 tailwind.config.js,配置迁入 tailwind.css:
    • 只引入 theme 与 utilities,不引入 preflight
    • antd CSS 变量桥接改用 @theme inline。必须用 inline:--ant-* 变量挂在 .css-var-* 作用域上,不在 :root
    • @source 把扫描范围限定在 src 下的 ts/tsx
    • 用 @source not inline() 取代原来的 blocklist
  • 工具类刻意不放进 @layer:分层后的工具类在与 antd CSS-in-JS、antd reset、CSS Modules 和第三方样式冲突时一律落败。不分层可以保持 v3 的层叠语义,理由也写在 tailwind.css 头部注释里
  • 日历侧栏的 space-y-3 改为与 v3 等价的选择器。v4 的 space-y 改成了零特异性的 margin-bottom,会输给 antd 排版组件自带的外边距
  • stylelint 补上 v4 的指令;README 注明新的浏览器基线:Chrome 111+ / Firefox 128+ / Safari 16.4+
  • 顺带修复:.eslintignore 取消忽略根目录的两个点文件配置。原先任何改动 .stylelintrc.js 的提交都会被 pre-commit 挡住(ESLint 8 报「File ignored by default」,在 --max-warnings=0 下失败)

验证

  • 逐像素对比:阶段 2 与本分支的 dev 构建并排运行,1440×900 视口下截取 17 个页面。除日历页外全部 0 像素差;日历侧栏在修正 space-y 后也恢复一致
  • 日历交互:框选日期新建事件、点击事件确认删除、年/月/周/日切换、切换周末(列数 7 → 5)均通过;暗色模式已截图确认
  • 24 个路由的控制台干净;pnpm check、体积门禁、两条构建均通过(体积与阶段 2 基本相同)
  • 生成的 CSS 已核对:工具类未分层、token 类展开为 var(--ant-*)、被拦截的类名没有生成、--color-gray-200 已输出

需要注意

Tailwind 4 依赖 @property / color-mix(),全站浏览器基线提高到 Chrome 111+ / Firefox 128+ / Safari 16.4+。

FullCalendar 6 -> 7
- daygrid/timegrid/interaction/multimonth packages are gone; plugins
  come from @fullcalendar/react/* entrypoints, temporal-polyfill is a
  new peer, @fullcalendar/core is no longer a direct dependency
- v7 ships no CSS: skeleton + Classic theme (the v6 look) + palette
- types renamed (DateSelectArg -> DateSelectInfo, EventClickArg ->
  EventClickInfo, EventContentArg -> EventDisplayInfo)
- the palette switches on an ancestor [data-color-scheme], now driven by
  the app theme, so the calendar follows dark mode
- visible deltas: day numbers were blue in v6 only because antd colors
  bare <a>; column headers are no longer bold (v7 default)

Tailwind CSS 3 -> 4 (umi 4.7 compiles it via @tailwindcss/webpack)
- tailwind.config.js replaced by CSS-first config in tailwind.css:
  theme + utilities imports without preflight, @theme inline for the
  antd CSS-variable bridge (inline is required: the --ant-* vars live
  on .css-var-* scopes, not :root), @source limited to src ts/tsx,
  @source not inline() instead of blocklist
- utilities are imported unlayered on purpose: layered utilities lose
  every conflict against antd CSS-in-JS, antd reset.css, CSS modules and
  third-party sheets; unlayered keeps v3 cascade semantics
- the calendar sidebar's space-y-3 becomes the equivalent v3 selector
  (v4 space-y is a :where() margin-bottom that antd typography margins
  override)
- stylelint knows the v4 at-rules; README states the new browser
  baseline (Chrome 111 / Firefox 128 / Safari 16.4)
- .eslintignore un-ignores the root dotfile configs: lint-staged passed
  .stylelintrc.js explicitly, ESLint 8 warned "File ignored by default"
  and --max-warnings=0 blocked any commit touching it

verified: 17 pages pixel-identical to phase 2 except the calendar
(1440x900, dev build side by side); calendar select-create, click-
delete, view tabs, weekends toggle; 24 routes clean console; size
gate and both builds pass
@coderabbitai

coderabbitai Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 43 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 69116128-95a9-429a-9b3e-36a132266f54

📥 Commits

Reviewing files that changed from the base of the PR and between 1d4b761 and 773d961.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (10)
  • .claude/CLAUDE.md
  • .eslintignore
  • .stylelintrc.js
  • CHANGELOG.md
  • README.md
  • package.json
  • src/pages/Feature/FullCalendar/event-utils.tsx
  • src/pages/Feature/FullCalendar/index.tsx
  • tailwind.config.js
  • tailwind.css

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.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying umi-react-admin with  Cloudflare Pages  Cloudflare Pages

Latest commit: 773d961
Status: ✅  Deploy successful!
Preview URL: https://f838a3d6.umi-react-admin.pages.dev
Branch Preview URL: https://chore-deps-phase3.umi-react-admin.pages.dev

View logs

Base automatically changed from chore/deps-phase2 to master September 23, 2026 07:25
@Jerry-CodeHub
Jerry-CodeHub merged commit 4600c7c into master Sep 23, 2026
5 checks passed
@Jerry-CodeHub
Jerry-CodeHub deleted the chore/deps-phase3 branch September 23, 2026 07:25
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