Skip to content

Commit

Permalink
Merge pull request #35891 from appsmithorg/release
Browse files Browse the repository at this point in the history
27/08 Daily Promotion
  • Loading branch information
yatinappsmith committed Aug 28, 2024
2 parents 64ebe15 + c567b13 commit a99b4e7
Show file tree
Hide file tree
Showing 285 changed files with 3,181 additions and 3,287 deletions.
2 changes: 1 addition & 1 deletion .github/config.json

Large diffs are not rendered by default.

15 changes: 14 additions & 1 deletion .github/workflows/ci-test-custom-script.yml
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,20 @@ jobs:
name: server-logs-${{ matrix.job }}
path: app/server/server-logs.log
overwrite: true


- name: Collect docker log as file
if: always()
run: |
docker logs appsmith >& app/server/docker-logs.log
- name: Upload server docker logs bundle on failure
uses: actions/upload-artifact@v4
if: always()
with:
name: docker-logs-${{ matrix.job }}
path: app/server/docker-logs.log
overwrite: true

# Set status = success
- name: Save the status of the run
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pr-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
pull_request:
branches:
- release
- master
- pg
types: [ labeled, synchronize ]

Expand Down
82 changes: 82 additions & 0 deletions .github/workflows/sync-release-to-pg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Merge release to pg

on:
push:
branches:
- release # Trigger on push to the release branch

jobs:
merge-release-to-pg:
runs-on: ubuntu-latest

steps:
- name: Checkout release branch
uses: actions/checkout@v3
with:
ref: release # Checkout the release branch

- name: Fetch all branches
run: git fetch origin pg

- name: Checkout pg branch
run: git checkout pg

- name: Merge release to pg
id: merge_commits
run: |
PG_HEAD=$(git rev-parse pg)
RELEASE_HEAD=$(git rev-parse release)
echo "PG_HEAD=$PG_HEAD"
echo "RELEASE_HEAD=$RELEASE_HEAD"
# Checkout the pg branch
git checkout pg
# Attempt to merge release into pg
if ! git merge release; then
echo "Merge conflict detected during merge"
# Capture the conflicting commit SHAs (both HEAD of pg and the merge commit from release)
CONFLICTING_COMMIT=$(git log -1 --pretty=format:"%H")
echo "CONFLICTING_COMMIT=$CONFLICTING_COMMIT" >> $GITHUB_ENV
git merge --abort
echo "MERGE_CONFLICT=true" >> $GITHUB_ENV
else
echo "MERGE_CONFLICT=false" >> $GITHUB_ENV
fi
- name: Push changes
if: env.MERGE_CONFLICT == 'false'
run: |
git push origin pg
- name: Notify on merge conflicts
if: env.MERGE_CONFLICT == 'true'
env:
REPOSITORY_URL: ${{ github.repositoryUrl }}
CONFLICTING_COMMIT: ${{ env.CONFLICTING_COMMIT }}
run: |
# Prepare the message for Slack
message="Merge conflict detected while merging release into pg branch. Conflicted commits:\n"
commit_url="$REPOSITORY_URL/commit/$CONFLICTING_COMMIT"
message+="$commit_url\n"
# Send the message to Slack
# This unwieldy horror of a sed command, converts standard Markdown links to Slack's unwieldy link syntax.
slack_message="$(echo "$message" | sed -E 's/\[([^]]+)\]\(([^)]+)\)/<\2|\1>/g')"
# This is the ChannelId of the proj postgres channel.
body="$(jq -nc \
--arg channel C06Q3A97USE \
--arg text "$slack_message" \
'$ARGS.named'
)"
curl --version
curl -v https://slack.com/api/chat.postMessage \
--header 'Authorization: Bearer ${{ secrets.SLACK_APPSMITH_ALERTS_TOKEN }}' \
--header 'Content-Type: application/json; charset=utf-8' \
--data-raw "$body"
97 changes: 48 additions & 49 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@ app/client/tsconfig.path.json @KelvinOm
# WDS team
app/client/packages/design-system/* @appsmithorg/wds-team
app/client/packages/storybook/* @appsmithorg/wds-team
app/client/src/widgets/wds/* @appsmithorg/wds-team
app/client/src/widgets/wds/* @appsmithorg/wds-team @appsmithorg/anvil-team

# Anvil-team
app/client/src/layoutSystems/anvil/* @appsmithorg/anvil-team
app/client/src/widgets/anvil/* @appsmithorg/anvil-team

# App viewers pod
app/client/src/widgets/* @appsmithorg/app-viewers
Expand Down Expand Up @@ -53,52 +52,52 @@ app/server/appsmith-server/src/main/java/com/appsmith/server/services/FeatureFla
app/server/appsmith-server/src/test/java/com/appsmith/server/services/FeatureFlagServiceTest.java @nilanshbansal

# UI Builders Pod
app/client/generators/* @appsmithorg/ui-builders
app/client/src/actions/autoHeightActions.ts @appsmithorg/ui-builders
app/client/src/actions/autoLayoutActions.ts @appsmithorg/ui-builders
app/client/src/actions/canvasSelectionActions.ts @appsmithorg/ui-builders
app/client/src/actions/reflowActions.ts @appsmithorg/ui-builders
app/client/src/actions/widgetSelectionActions.ts @appsmithorg/ui-builders
app/client/src/components/propertyControls/* @appsmithorg/ui-builders
app/client/src/layoutSystems/* @appsmithorg/ui-builders
app/client/src/pages/Editor/Canvas.tsx @appsmithorg/ui-builders
app/client/src/pages/Editor/CanvasLayoutConversion/* @appsmithorg/ui-builders
app/client/src/pages/Editor/PropertyPane/* @appsmithorg/ui-builders
app/client/src/pages/Editor/WidgetsEditor/* @appsmithorg/ui-builders
app/client/src/reducers/entityReducers/autoHeightReducers/* @appsmithorg/ui-builders
app/client/src/reducers/entityReducers/canvasWidgetsReducer.ts @appsmithorg/ui-builders
app/client/src/reflow/* @appsmithorg/ui-builders
app/client/src/sagas/AutoLayoutUpdateSagas.tsx @appsmithorg/ui-builders
app/client/src/sagas/CanvasSagas/* @appsmithorg/ui-builders
app/client/src/sagas/ReplaySaga.ts @appsmithorg/ui-builders
app/client/src/sagas/SnapshotSagas.ts @appsmithorg/ui-builders
app/client/src/sagas/WidgetAdditionSagas.ts @appsmithorg/ui-builders
app/client/src/sagas/WidgetBlueprintSagas.ts @appsmithorg/ui-builders
app/client/src/sagas/WidgetDeletionSagas.ts @appsmithorg/ui-builders
app/client/src/sagas/WidgetOperationSagas.tsx @appsmithorg/ui-builders
app/client/src/sagas/WidgetOperationUtils.ts @appsmithorg/ui-builders
app/client/src/sagas/WidgetSelectUtils.ts @appsmithorg/ui-builders
app/client/src/sagas/WidgetSelectionSagas.ts @appsmithorg/ui-builders
app/client/src/sagas/autoHeightSagas/* @appsmithorg/ui-builders
app/client/src/sagas/layoutConversionSagas.ts @appsmithorg/ui-builders
app/client/src/selectors/autoHeightSelectors.ts @appsmithorg/ui-builders
app/client/src/selectors/autoLayoutSelectors.tsx @appsmithorg/ui-builders
app/client/src/selectors/canvasSelectors.ts @appsmithorg/ui-builders
app/client/src/selectors/widgetSelectors.ts @appsmithorg/ui-builders
app/client/src/utils/autoHeight/* @appsmithorg/ui-builders
app/client/src/utils/hooks/autoHeightUIHooks.ts @appsmithorg/ui-builders
app/client/src/utils/hooks/useAllowEditorDragToSelect.ts @appsmithorg/ui-builders
app/client/src/utils/hooks/useClickToSelectWidget.tsx @appsmithorg/ui-builders
app/client/src/utils/hooks/useDynamicAppLayout.tsx @appsmithorg/ui-builders
app/client/src/utils/hooks/usePositionedContainerZIndex.ts @appsmithorg/ui-builders
app/client/src/utils/hooks/useReflow.ts @appsmithorg/ui-builders
app/client/src/utils/hooks/useWidgetSelection.ts @appsmithorg/ui-builders
app/client/src/widgets/BaseWidget.tsx @appsmithorg/ui-builders
app/client/src/widgets/BaseWidgetHOC/* @appsmithorg/ui-builders
app/client/src/widgets/CanvasWidget.tsx @appsmithorg/ui-builders
app/client/src/widgets/ContainerWidget/* @appsmithorg/ui-builders
app/client/src/widgets/MetaHOC.tsx @appsmithorg/ui-builders
app/client/src/widgets/withWidgetProps.tsx @appsmithorg/ui-builders
app/client/generators/* @appsmithorg/anvil-team
app/client/src/actions/autoHeightActions.ts @appsmithorg/anvil-team
app/client/src/actions/autoLayoutActions.ts @appsmithorg/anvil-team
app/client/src/actions/canvasSelectionActions.ts @appsmithorg/anvil-team
app/client/src/actions/reflowActions.ts @appsmithorg/anvil-team
app/client/src/actions/widgetSelectionActions.ts @appsmithorg/anvil-team
app/client/src/components/propertyControls/* @appsmithorg/anvil-team
app/client/src/layoutSystems/* @appsmithorg/anvil-team
app/client/src/pages/Editor/Canvas.tsx @appsmithorg/anvil-team
app/client/src/pages/Editor/CanvasLayoutConversion/* @appsmithorg/anvil-team
app/client/src/pages/Editor/PropertyPane/* @appsmithorg/anvil-team
app/client/src/pages/Editor/WidgetsEditor/* @appsmithorg/anvil-team
app/client/src/reducers/entityReducers/autoHeightReducers/* @appsmithorg/anvil-team
app/client/src/reducers/entityReducers/canvasWidgetsReducer.ts @appsmithorg/anvil-team
app/client/src/reflow/* @appsmithorg/anvil-team
app/client/src/sagas/AutoLayoutUpdateSagas.tsx @appsmithorg/anvil-team
app/client/src/sagas/CanvasSagas/* @appsmithorg/anvil-team
app/client/src/sagas/ReplaySaga.ts @appsmithorg/anvil-team
app/client/src/sagas/SnapshotSagas.ts @appsmithorg/anvil-team
app/client/src/sagas/WidgetAdditionSagas.ts @appsmithorg/anvil-team
app/client/src/sagas/WidgetBlueprintSagas.ts @appsmithorg/anvil-team
app/client/src/sagas/WidgetDeletionSagas.ts @appsmithorg/anvil-team
app/client/src/sagas/WidgetOperationSagas.tsx @appsmithorg/anvil-team
app/client/src/sagas/WidgetOperationUtils.ts @appsmithorg/anvil-team
app/client/src/sagas/WidgetSelectUtils.ts @appsmithorg/anvil-team
app/client/src/sagas/WidgetSelectionSagas.ts @appsmithorg/anvil-team
app/client/src/sagas/autoHeightSagas/* @appsmithorg/anvil-team
app/client/src/sagas/layoutConversionSagas.ts @appsmithorg/anvil-team
app/client/src/selectors/autoHeightSelectors.ts @appsmithorg/anvil-team
app/client/src/selectors/autoLayoutSelectors.tsx @appsmithorg/anvil-team
app/client/src/selectors/canvasSelectors.ts @appsmithorg/anvil-team
app/client/src/selectors/widgetSelectors.ts @appsmithorg/anvil-team
app/client/src/utils/autoHeight/* @appsmithorg/anvil-team
app/client/src/utils/hooks/autoHeightUIHooks.ts @appsmithorg/anvil-team
app/client/src/utils/hooks/useAllowEditorDragToSelect.ts @appsmithorg/anvil-team
app/client/src/utils/hooks/useClickToSelectWidget.tsx @appsmithorg/anvil-team
app/client/src/utils/hooks/useDynamicAppLayout.tsx @appsmithorg/anvil-team
app/client/src/utils/hooks/usePositionedContainerZIndex.ts @appsmithorg/anvil-team
app/client/src/utils/hooks/useReflow.ts @appsmithorg/anvil-team
app/client/src/utils/hooks/useWidgetSelection.ts @appsmithorg/anvil-team
app/client/src/widgets/BaseWidget.tsx @appsmithorg/anvil-team
app/client/src/widgets/BaseWidgetHOC/* @appsmithorg/anvil-team
app/client/src/widgets/CanvasWidget.tsx @appsmithorg/anvil-team
app/client/src/widgets/ContainerWidget/* @appsmithorg/anvil-team
app/client/src/widgets/MetaHOC.tsx @appsmithorg/anvil-team
app/client/src/widgets/withWidgetProps.tsx @appsmithorg/anvil-team

# Git Pod
app/server/appsmith-git/ @appsmithorg/git-be-reviewers
Expand Down Expand Up @@ -199,7 +198,7 @@ app/client/src/ce/JSFunctionExecutionSaga.ts @ApekshaBhosale
app/client/src/ee/JSFunctionExecutionSaga.ts @ApekshaBhosale

# Enterprise Success
app/server/appsmith-server/src/main/java/com/appsmith/server/migrations/**/* @sharat87 @vivonk @abhvsn
app/server/appsmith-server/src/main/java/com/appsmith/server/migrations/**/* @sharat87 @abhvsn

# DevOps & Shri
deploy/**/* @sharat87 @pratapaprasanna
Expand Down
17 changes: 16 additions & 1 deletion app/client/.eslintrc.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,18 @@
"sort-destructure-keys",
"cypress",
"testing-library",
"jest"
"jest",
"@appsmith",
"react-perf"
],
"extends": [
"plugin:react/recommended", // Uses the recommended rules from @eslint-plugin-react
"plugin:@typescript-eslint/recommended",
"plugin:cypress/recommended",
"plugin:testing-library/react",
"plugin:react-hooks/recommended",
"plugin:@appsmith/recommended",
"plugin:react-perf/recommended",
// Note: Please keep this as the last config to make sure that this (and by extension our .prettierrc file) overrides all configuration above it
// https://www.npmjs.com/package/eslint-plugin-prettier#recommended-configuration
"plugin:prettier/recommended"
Expand Down Expand Up @@ -65,6 +69,17 @@
],
"no-console": "error",
"no-debugger": "error",
"react-perf/jsx-no-new-array-as-prop": "warn",
"react-perf/jsx-no-new-function-as-prop": "warn",
"react-perf/jsx-no-jsx-as-prop": "warn",
"react-perf/jsx-no-new-object-as-prop": [
"warn",
{
// we are disabling this rule here for native component since it won't make much difference in performance
// we want to target react components more since there is possibility they can be pure components and new istance props should be avoided for them
"nativeAllowList": "all"
}
],
"@typescript-eslint/no-restricted-imports": [
"error",
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,26 +175,21 @@ describe(
);

const zone1Selector = anvilLocators.anvilWidgetNameSelector("Zone1");
const section1Selector =
anvilLocators.anvilWidgetNameSelector("Section1");

anvilLayout.sections.mouseDownSpaceDistributionHandle("Section1", 1);
// outline color of zone while distributing space should be transparent
cy.get(zone1Selector).should(
"have.css",
"outline-color",
"rgba(0, 0, 0, 0)",
);
anvilLayout.sections.mouseUpSpaceDistributionHandle("Section1", 1);
// select zone1
agHelper.GetNClick(zone1Selector);
// go to style tab
propPane.MoveToTab("Style");
// toggle visual separation off on property pane
propPane.TogglePropertyState("Visual Separation", "Off");
anvilLayout.sections.mouseDownSpaceDistributionHandle("Section1", 1);
// outline color of background less zone while distributing space should not be transparent
cy.get(zone1Selector).should(
// outline color of section while distributing space should not be transparent
cy.get(section1Selector).should(
"not.have.css",
"outline-color",
"rgba(0, 0, 0, 0)",
"transparent",
);
});
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
locators,
propPane,
widgetLocators,
jsEditor,
} from "../../../../../support/Objects/ObjectsCore";
import EditorNavigation, {
EntityType,
Expand All @@ -20,6 +21,24 @@ describe(
entityExplorer.DragDropWidgetNVerify(draggableWidgets.SELECT);
});

const validateLabelAndValueKey = (labelKey: string, valueKey: string) => {
// Validate Label key
propPane.ToggleJSMode("Label key", true);
propPane.UpdatePropertyFieldValue("Label key", labelKey);
agHelper.SelectDropDown("Blue");
agHelper.ReadSelectedDropDownValue().then(($selectedValue) => {
expect($selectedValue).to.eq("Blue");
});

// Validate Value key
propPane.ToggleJSMode("Value key", true);
propPane.UpdatePropertyFieldValue("Value key", valueKey);
agHelper.SelectDropDown("Blue");
agHelper.ReadSelectedDropDownValue().then(($selectedValue) => {
expect($selectedValue).to.eq("Blue");
});
};

it("1. Validate Label properties - Text , Position , Alignment , Width(in columns)", function () {
//Text
propPane.TypeTextIntoField("Text", "Select Value");
Expand Down Expand Up @@ -305,5 +324,37 @@ describe(
1,
);
});

it("10.Validate using function inside label key and value key returns correct label options", () => {
// Navigate back to the editor
deployMode.NavigateBacktoEditor();

// Select the widget
EditorNavigation.SelectEntityByName("Select1", EntityType.Widget);

// Validate keys
validateLabelAndValueKey("{{(() => 'name')()}}", "{{(() => 'code')()}}");

// Create JS Object with array data
jsEditor.CreateJSObject(
`export default {
array: [1, 2, 3]
}`,
{
completeReplace: true,
toRun: false,
prettify: true,
},
);

// Select the widget
EditorNavigation.SelectEntityByName("Select1", EntityType.Widget);

// Validate keys
validateLabelAndValueKey(
"{{JSObject1.array.length > 0 ? 'name' : ''}}",
"{{JSObject1.array.length > 0 ? 'code' : ''}}",
);
});
},
);
Loading

0 comments on commit a99b4e7

Please sign in to comment.