Skip to content

Commit

Permalink
chore: move transforms section behind a flag (#3810)
Browse files Browse the repository at this point in the history
## Description

This PR moves the `transforms` section behind a feature flag. The
section needs to add tooltips for all properties and scale need to have
a `lock` behaviour between the `scaleX` and `scaleY` properties.


## Code Review

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

## Before requesting a review

- [x] made a self-review

## Before merging

- [x] tested locally and on preview environment (preview dev login:
5de6)
  • Loading branch information
JayaKrishnaNamburu authored Jul 28, 2024
1 parent e0552f0 commit d56df60
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import { humanizeString } from "~/shared/string-utils";
import { getStyleSource } from "../../shared/style-info";
import { PropertyName } from "../../shared/property-name";
import { getDots } from "../../shared/collapsible-section";
import { isFeatureEnabled } from "@webstudio-is/feature-flags";

export const transformPanels = [
"translate",
Expand All @@ -60,8 +61,13 @@ export const properties = [
] satisfies Array<StyleProperty>;

export const Section = (props: SectionProps) => {
const { currentStyle, createBatchUpdate } = props;
const [isOpen, setIsOpen] = useState(true);

if (isFeatureEnabled("transforms") === false) {
return;
}

const { currentStyle, createBatchUpdate } = props;
const translateStyleSource = getStyleSource(currentStyle["translate"]);
const scaleStyleSource = getStyleSource(currentStyle["scale"]);
const rotateAndSkewStyleSrouce = getStyleSource(currentStyle["transform"]);
Expand Down
1 change: 1 addition & 0 deletions packages/feature-flags/src/flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ export const cms = false;
export const cssVars = false;
export const filters = false;
export const xmlElement = false;
export const transforms = false;

0 comments on commit d56df60

Please sign in to comment.