Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: change default position to TOP for widgets with labels #17726

Merged
merged 4 commits into from Oct 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/client/src/widgets/CheckboxGroupWidget/index.ts
Expand Up @@ -9,7 +9,7 @@ export const CONFIG = {
iconSVG: IconSVG,
needsMeta: true,
defaults: {
rows: 4,
rows: 6,
columns: 23,
animateLoading: true,
labelTextSize: "0.875rem",
Expand All @@ -24,7 +24,7 @@ export const CONFIG = {
isRequired: false,
isVisible: true,
labelText: "Label",
labelPosition: LabelPosition.Left,
labelPosition: LabelPosition.Top,
labelAlignment: Alignment.LEFT,
labelWidth: 5,
widgetName: "CheckboxGroup",
Expand Down
3 changes: 3 additions & 0 deletions app/client/src/widgets/CurrencyInputWidget/index.ts
Expand Up @@ -2,6 +2,7 @@ import Widget from "./widget";
import IconSVG from "./icon.svg";
import { CONFIG as BaseConfig } from "widgets/BaseInputWidget";
import { getDefaultCurrency } from "./component/CurrencyCodeDropdown";
import { LabelPosition } from "components/constants";

export const CONFIG = {
type: Widget.getWidgetType(),
Expand All @@ -13,6 +14,8 @@ export const CONFIG = {
...BaseConfig.defaults,
widgetName: "CurrencyInput",
version: 1,
rows: 7,
labelPosition: LabelPosition.Top,
allowCurrencyChange: false,
defaultCurrencyCode: getDefaultCurrency().currency,
decimals: 0,
Expand Down
4 changes: 2 additions & 2 deletions app/client/src/widgets/DatePickerWidget2/index.ts
Expand Up @@ -14,9 +14,9 @@ export const CONFIG = {
defaults: {
isDisabled: false,
datePickerType: "DATE_PICKER",
rows: 4,
rows: 7,
label: "Label",
labelPosition: LabelPosition.Left,
labelPosition: LabelPosition.Top,
labelAlignment: Alignment.LEFT,
labelWidth: 5,
labelTextSize: "0.875rem",
Expand Down
3 changes: 3 additions & 0 deletions app/client/src/widgets/InputWidgetV2/index.ts
@@ -1,6 +1,7 @@
import Widget from "./widget";
import IconSVG from "./icon.svg";
import { CONFIG as BaseConfig } from "widgets/BaseInputWidget";
import { LabelPosition } from "components/constants";

export const CONFIG = {
type: Widget.getWidgetType(),
Expand All @@ -10,6 +11,8 @@ export const CONFIG = {
searchTags: ["form", "text input", "number", "textarea"],
defaults: {
...BaseConfig.defaults,
rows: 7,
labelPosition: LabelPosition.Top,
inputType: "TEXT",
widgetName: "Input",
version: 2,
Expand Down
4 changes: 2 additions & 2 deletions app/client/src/widgets/MultiSelectTreeWidget/index.ts
Expand Up @@ -10,7 +10,7 @@ export const CONFIG = {
needsMeta: true,
searchTags: ["dropdown"],
defaults: {
rows: 4,
rows: 7,
columns: 20,
mode: "SHOW_ALL",
animateLoading: true,
Expand Down Expand Up @@ -42,7 +42,7 @@ export const CONFIG = {
expandAll: false,
placeholderText: "Select option(s)",
labelText: "Label",
labelPosition: LabelPosition.Left,
labelPosition: LabelPosition.Top,
labelAlignment: Alignment.LEFT,
labelWidth: 5,
labelTextSize: "0.875rem",
Expand Down
4 changes: 2 additions & 2 deletions app/client/src/widgets/MultiSelectWidgetV2/index.ts
Expand Up @@ -10,11 +10,11 @@ export const CONFIG = {
needsMeta: true,
searchTags: ["dropdown", "tags"],
defaults: {
rows: 4,
rows: 7,
columns: 20,
animateLoading: true,
labelText: "Label",
labelPosition: LabelPosition.Left,
labelPosition: LabelPosition.Top,
labelAlignment: Alignment.LEFT,
labelWidth: 5,
labelTextSize: "0.875rem",
Expand Down
3 changes: 3 additions & 0 deletions app/client/src/widgets/PhoneInputWidget/index.ts
Expand Up @@ -2,6 +2,7 @@ import Widget from "./widget";
import IconSVG from "./icon.svg";
import { CONFIG as BaseConfig } from "widgets/BaseInputWidget";
import { getDefaultISDCode } from "./component/ISDCodeDropdown";
import { LabelPosition } from "components/constants";

export const CONFIG = {
type: Widget.getWidgetType(),
Expand All @@ -13,6 +14,8 @@ export const CONFIG = {
...BaseConfig.defaults,
widgetName: "PhoneInput",
version: 1,
rows: 7,
labelPosition: LabelPosition.Top,
defaultDialCode: getDefaultISDCode().dial_code,
allowDialCodeChange: false,
allowFormatting: true,
Expand Down
4 changes: 2 additions & 2 deletions app/client/src/widgets/RadioGroupWidget/index.ts
Expand Up @@ -10,11 +10,11 @@ export const CONFIG = {
needsMeta: true,
searchTags: ["choice"],
defaults: {
rows: 4,
rows: 6,
columns: 20,
animateLoading: true,
label: "Label",
labelPosition: LabelPosition.Left,
labelPosition: LabelPosition.Top,
labelAlignment: Alignment.LEFT,
labelTextSize: "0.875rem",
labelWidth: 5,
Expand Down
4 changes: 2 additions & 2 deletions app/client/src/widgets/SelectWidget/index.ts
Expand Up @@ -10,11 +10,11 @@ export const CONFIG = {
needsMeta: true,
searchTags: ["dropdown"],
defaults: {
rows: 4,
rows: 7,
columns: 20,
placeholderText: "Select option",
labelText: "Label",
labelPosition: LabelPosition.Left,
labelPosition: LabelPosition.Top,
labelAlignment: Alignment.LEFT,
labelWidth: 5,
options: [
Expand Down
4 changes: 2 additions & 2 deletions app/client/src/widgets/SingleSelectTreeWidget/index.ts
Expand Up @@ -10,7 +10,7 @@ export const CONFIG = {
iconSVG: IconSVG,
needsMeta: true,
defaults: {
rows: 4,
rows: 7,
columns: 20,
animateLoading: true,
options: [
Expand Down Expand Up @@ -41,7 +41,7 @@ export const CONFIG = {
expandAll: false,
placeholderText: "Select option",
labelText: "Label",
labelPosition: LabelPosition.Left,
labelPosition: LabelPosition.Top,
labelAlignment: Alignment.LEFT,
labelWidth: 5,
labelTextSize: "0.875rem",
Expand Down
4 changes: 2 additions & 2 deletions app/client/src/widgets/SwitchGroupWidget/index.ts
Expand Up @@ -11,7 +11,7 @@ export const CONFIG = {
isCanvas: false, // Defines if this widget has a canvas within in which we can drop other widgets
defaults: {
widgetName: "SwitchGroup",
rows: 4,
rows: 6,
columns: 26,
options: [
{ label: "Blue", value: "BLUE" },
Expand All @@ -26,7 +26,7 @@ export const CONFIG = {
animateLoading: true,
alignment: Alignment.LEFT,
labelText: "Label",
labelPosition: LabelPosition.Left,
labelPosition: LabelPosition.Top,
labelAlignment: Alignment.LEFT,
labelWidth: 5,
version: 1,
Expand Down