16 Commits
Author SHA1 Message Date
Oleg Isonen 9f497a3513 feat: Redirects improvements (#5619)
Show a warning banner when a redirect path matches the current page
path, indicating the redirect will override access to the page.

Changes:
- Add PanelBanner component with warning variant to page settings
- Implement findMatchingRedirect utility to detect redirect conflicts
- Show contextual warning with link to Redirects settings section
- Add comprehensive tests for redirect conflict detection

Code quality:
- Replace 'return undefined' with 'return' per style guide
- Use 'return null' for React components returning nothing
2026-02-19 11:26:07 +01:00
Oleg Isonen cd0174807d chore: use console.info instead of console.log (#3049)
## Description

We allow console.info (btw we should also allow warn/error/info), we
only disallow console.log in the linter because that's what we use for
debugging.

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @TrySound , I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2024-03-24 12:52:46 +01:00
Roman Pominov a1edc22be1 Type-safe CSS Stitches' variables (#792)
I've replaced all `"$something$something"` CSS variables with
`variables.something.something`. Now we have autocomplete and
type-safety: if a variable is removed or renamed w/o fixing the usage
the build will fail.

This will allow designers to change design tokens and either make sure
nothing is broken or if something is broken we'll know exactly what and
it will be easy to fix.

Discussed here:
https://discord.com/channels/955905230107738152/1061992022665334837
2023-01-17 09:36:24 +03:00
Bogdan Chadkin b3c87af7c1 Migrate to pnpm for package management (#641)
- setup corepack for pnpm and forbid yarn usage with "engines" field
- converted yarn lockfile into pnpm lockfile with `pnpm import` command
- replaced yarn with pnpm in scripts and github actions, had to use
custom cache to support corepack

This PR is only migration. Will use new pnpm features in other PRs.

```diff
du -ckd1 node_modules (yarn)
- 1125032

du -ckd1 node_modules/.pnpm
+ 857456
```

Install time (including cache downloads) in github actions reduced from
42s to 23s


## Before requesting a review

- [ ] if the PR is WIP - use draft mode
- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")
- [ ] what kind of review is needed?
  - [x] conceptual
  - [X] detailed
  - [ ] with testing

## Test cases

- [ ] step by step interaction description and what is expected to
happen

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio-designer/blob/main/apps/designer/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `designer/env-check.js` if mandatory
2022-12-22 12:16:13 +03:00
Oleg Isonen 8982daa467 radii migration doesn't work, will do manually 2022-11-10 15:55:24 +01:00
Oleg Isonen 4da17d0b02 fix replacement of $radii 2022-11-10 15:54:03 +01:00
Oleg Isonen 2f493baa5c replace $radii 2022-11-10 15:51:17 +01:00
Oleg Isonen 0f641654ca borderRadius migration 2022-11-10 15:49:01 +01:00
Oleg Isonen 7ee3a3565f fix migration script for lineHeight 2022-11-10 15:35:11 +01:00
Oleg Isonen 0328035c5e line-height migration script 2022-11-10 15:34:45 +01:00
Oleg Isonen ede1ab58a5 also migrate legacy font sizes to the new convention $fontSize$x 2022-11-10 15:09:31 +01:00
Oleg Isonen 3238b8fb2c fix migration script for $1 2022-11-10 15:05:58 +01:00
Oleg Isonen d836413ef4 more fontSize migration tweeks 2022-11-10 14:54:39 +01:00
Oleg Isonen 330177b45b prepare fontSizes migration 2022-11-10 14:49:24 +01:00
Oleg Isonen 31e4fad38a make migration script more generic 2022-11-10 14:36:18 +01:00
Oleg Isonen 24cf6c6fa6 migrate-spacing 2022-11-09 21:59:04 +01:00