Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions apps/new/widget/Index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,22 @@ const { Footer } = VM.require("${config_account}/widget/components.Footer") || {
Footer: () => <></>,
};

const data = fetch(`https://httpbin.org/headers`);
const gatewayURL = data?.body?.headers?.Origin ?? "";

const Container =
gatewayURL.includes("near.org") || gatewayURL.includes("everything.dev")
? styled.div`
width: 100%;
`
: styled.div`
position: fixed;
inset: 73px 0px 0px;
width: 100%;
overflow-y: scroll;
height: 100%;
`;

const config = {
theme: {},
layout: {
Expand Down Expand Up @@ -111,7 +127,9 @@ const config = {
};

return (
<CSS>
<Widget src="${alias_old}/widget/app.view" props={{ config, ...props }} />
</CSS>
<Container>
<CSS>
<Widget src="${alias_old}/widget/app.view" props={{ config, ...props }} />
</CSS>
</Container>
);
8 changes: 8 additions & 0 deletions apps/new/widget/page/project/QuickView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ const { href } = VM.require("${alias_old}/widget/lib.url") || {
href: () => {},
};

const data = fetch(`https://httpbin.org/headers`);
const gatewayURL = data?.body?.headers?.Origin ?? "";

const isNearDiscovery =
gatewayURL.includes("near.org") || gatewayURL.includes("everything.dev");

const showCanvas = props.showCanvas;
const onClose = props.onClose;
const project = props.project;
Expand All @@ -22,6 +28,7 @@ const profile = {
const Container = styled.div`
.offcanvas.offcanvas-end {
width: 60% !important;
top: 73px;
}

.close {
Expand Down Expand Up @@ -86,6 +93,7 @@ return (
tabIndex="-1"
data-bs-scroll="false"
data-bs-backdrop="true"
style={{ top: isNearDiscovery ? "" : "73px" }}
>
<div class="close cursor" onClick={onClose}>
<div className="d-block d-md-none">
Expand Down
14 changes: 2 additions & 12 deletions playwright-tests/tests/projects.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ test.describe("?page=projects", () => {

test.beforeEach(async ({ page }) => {
const editBtn = page.getByTestId("edit-btn");
await expect(editBtn).toBeVisible();
await expect(editBtn).toBeVisible({ timeout: 10000 });
await editBtn.click();
expect(page.url()).toContain("?page=projects&tab=editor");
});
Expand All @@ -155,20 +155,10 @@ test.describe("?page=projects", () => {
"meghagoel.testnet": {
project: {
"testing-project-on-builddao": {
"": '{"title":"New project title","description":"New Project description","profileImage":{"ipfs_cid":"bafkreifk42ibqsg5sfky5tlhkfty6rkup5leqite5koenhesnuwq55kufi"},"backgroundImage":{"ipfs_cid":"bafkreidbfu7uxtr4is7wxileg3mrbajve6cgkfmrqemc6pxsr6nnczz7ly"},"tags":{"test":""},"linktree":{"twitter":"https://test.nearbuilders.org/","github":"https://test.nearbuilders.org/","telegram":"https://test.nearbuilders.org/","website":"https://test.nearbuilders.org/"},"contributors":["megha19.testnet"],"tabs":["overview","activity","tasks"],"projectAccountId":"meghagoel.testnet","teamSize":"1-10","location":"New Location"}',
"": '{"title":"New project title","description":"New Project description","profileImage":{"ipfs_cid":"bafkreifk42ibqsg5sfky5tlhkfty6rkup5leqite5koenhesnuwq55kufi"},"backgroundImage":{"ipfs_cid":"bafkreidbfu7uxtr4is7wxileg3mrbajve6cgkfmrqemc6pxsr6nnczz7ly"},"tags":{"test":""},"linktree":{"twitter":"https://test.nearbuilders.org/","github":"https://test.nearbuilders.org/","telegram":"https://test.nearbuilders.org/","website":"https://test.nearbuilders.org/"},"contributors":["meghagoel.testnet"],"tabs":["overview","activity","tasks","updatesfeed","feedbackfeed"],"projectAccountId":"meghagoel.testnet","teamSize":"1-10","location":"New Location"}',
metadata: {
name: "New project title",
description: "New Project description",

tags: {
test: "",
},
linktree: {
twitter:
"https://twitter.com/https://test.nearbuilders.org/",
github: "https://github.com/https://test.nearbuilders.org/",
telegram: "https://t.me/https://test.nearbuilders.org/",
},
},
},
},
Expand Down