Skip to content

Commit

Permalink
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
Browse files Browse the repository at this point in the history
…o chore/update-editable-action-name
  • Loading branch information
ankitakinger committed Oct 18, 2024
2 parents 8fd3fa3 + f547821 commit 0b695e8
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 68 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import type { Components } from "react-markdown";

import { a } from "./mdComponents/Link";
import { code } from "./mdComponents/Code";
import { p } from "./mdComponents/Paragraph";
import { ul, ol, li } from "./mdComponents/List";
import { h1, h2, h3, h4, h5, h6 } from "./mdComponents/Heading";

export const components: Components = {
Expand All @@ -14,9 +12,5 @@ export const components: Components = {
h4,
h5,
h6,
p,
ul,
ol,
li,
code,
};

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -74,26 +74,23 @@
margin-bottom: var(--inner-spacing-1);
}

[data-component="p"] {
margin-bottom: var(--inner-spacing-3);
}

/* Lists */
:is(ul, ol) {
margin-top: var(--inner-spacing-2);
margin-bottom: var(--inner-spacing-4);
margin-bottom: var(--inner-spacing-3);
padding-left: 0;
list-style: initial;
}

li {
margin-bottom: var(--inner-spacing-2);
margin-left: 1em;
position: relative;
list-style-type: auto;
}

[data-component="a"]:before,
[data-component="a"]:after {
content: none;
a {
display: inline-block;
}

[data-component="code"] {
Expand Down
31 changes: 27 additions & 4 deletions app/client/src/pages/common/SearchBar/EntitySearchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import { getPackagesList } from "ee/selectors/packageSelectors";
import Fuse from "fuse.js";
import { useOutsideClick } from "ee/hooks";
import type { PageDefaultMeta } from "ee/api/ApplicationApi";
import log from "loglevel";

const HeaderSection = styled.div`
display: flex;
Expand Down Expand Up @@ -135,12 +136,34 @@ function EntitySearchBar(props: any) {
(app: ApplicationPayload) => app.id === applicationId,
);

const defaultPage = searchedApplication?.pages.find(
let defaultPage = searchedApplication?.pages.find(
(page: PageDefaultMeta) => page.isDefault === true,
);
const viewURL = viewerURL({
basePageId: defaultPage.baseId,
});

if (!defaultPage) {
defaultPage = searchedApplication?.pages[0];
}

if (!defaultPage) {
log.error("No default page or pages found for the application");
}

const isGitEnabled = !!searchedApplication?.gitApplicationMetadata;
let viewURL = null;

if (isGitEnabled) {
const defaultBranch =
searchedApplication?.gitApplicationMetadata?.defaultBranchName;

viewURL = viewerURL({
basePageId: defaultPage.baseId,
branch: defaultBranch,
});
} else {
viewURL = viewerURL({
basePageId: defaultPage.baseId,
});
}

window.location.href = `${viewURL}`;
}
Expand Down

0 comments on commit 0b695e8

Please sign in to comment.