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

new instance and css improvements #203

Merged
merged 4 commits into from
Jan 8, 2025
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
1 change: 1 addition & 0 deletions .github/workflows/dry-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
- dry_run_command: npm run dry-run:testing
- dry_run_command: npm run dry-run:infinex
- dry_run_command: npm run dry-run:infinex-testing
- dry_run_command: npm run dry-run:templar
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release-instances.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
deploy_command: npm run deploy:infinex
- environment: treasury-testing-infinex.near
deploy_command: npm run deploy:infinex-testing
- environment: treasury-templar.near
deploy_command: npm run deploy:templar
environment: ${{ matrix.target_account.environment }}
steps:
- name: Checkout repository
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ return (
<div className="dropdown w-100" data-testid="dropdown">
<button
disabled={disabled}
className="btn drop-btn text-truncate dropdown-toggle bg-dropdown border rounded-2"
className="btn drop-btn text-truncate dropdown-toggle bg-dropdown border rounded-2 no-transparent"
type="button"
data-bs-toggle="dropdown"
aria-expanded="false"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ function AppLayout({ page, instance, children, treasuryDaoID, accountId }) {
--text-color: ${isDarkTheme ? "#CACACA" : "#1B1B18"};
--text-secondary-color: ${isDarkTheme ? "#878787" : "#999999"};
--text-alt-color: ${isDarkTheme ? "#FFFFFF" : "#FFFFFF"};
--link-inactive-color: ${isDarkTheme ? "" : "white"};
--link-active-color: ${isDarkTheme ? "" : "white"};
--border-color: ${isDarkTheme ? "#3B3B3B" : "rgba(226, 230, 236, 1)"};
--grey-01: ${isDarkTheme ? "#F4F4F4" : "#1B1B18"};
--grey-02: ${isDarkTheme ? "#B3B3B3" : "#555555"};
Expand Down Expand Up @@ -115,15 +113,15 @@ function AppLayout({ page, instance, children, treasuryDaoID, accountId }) {

a {
text-decoration: none;
color: var(--link-inactive-color) !important;
color: var(--text-color) !important;
&.active {
color: var(--link-active-color) !important;
color: var(--text-color) !important;
font-weight: 700 !important;
}

&:hover {
text-decoration: none;
color: var(--link-active-color) !important;
color: var(--text-color) !important;
font-weight: 700 !important;
}
}
Expand Down Expand Up @@ -286,9 +284,8 @@ function AppLayout({ page, instance, children, treasuryDaoID, accountId }) {
color: var(--text-color) !important;
}

.btn:disabled,
.btn.disabled,
fieldset:disabled {
.btn.disabled:not(.no-transparent),
fieldset:disabled:not(.no-transparent) {
border-color: transparent !important;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ return (
parseFloat(selectedTokensAvailable) <=
parseFloat(amount ? amount : 0) && (
<div className="d-flex gap-3 align-items-center warning px-3 py-2 rounded-3">
<i class="bi bi-exclamation-triangle h5"></i>
<i class="bi bi-exclamation-triangle warning-icon h5"></i>
<div>
The treasury balance is insufficient to cover the payment. You can
create the request, but it won’t be approved until the balance is
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ return (
<div className="d-flex flex-column gap-2">
This action will result in significant changes to the system.
<div className="d-flex gap-3 warning px-3 py-2 rounded-3">
<i class="bi bi-exclamation-triangle h5"></i>
<i class="bi bi-exclamation-triangle warning-icon h5"></i>
<div>
Changing this setting will require {requiredVotes} vote(s)
to approve requests. You will no longer be able to approve
Expand All @@ -341,7 +341,7 @@ return (
/>
<div className="flex-1 border-right py-3 ">
<div className="card-title px-3">Permission Groups</div>
<div className="d-flex flex-column gap-1 fw-bold">
<div className="d-flex flex-column gap-1" style={{ fontWeight: 600 }}>
{rolesData.map((role) => {
const name = role.roleName;
return (
Expand Down Expand Up @@ -455,7 +455,7 @@ return (
{isPercentageSelected &&
selectedGroup.threshold != selectedVoteValue && (
<div className="d-flex gap-3 warning px-3 py-2 rounded-3">
<i class="bi bi-exclamation-triangle h5"></i>
<i class="bi bi-exclamation-triangle warning-icon h5"></i>
<div>
<span className="fw-bolder">Warning! </span> <br />
If you choose a percentage-based threshold, the number of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ return (
<div className="card rounded-3 py-3" style={{ maxWidth: "50rem" }}>
<div className="card-title px-3 mb-0">Voting Duration</div>
<div className="p-3 d-flex flex-column gap-2">
<div className="fw-bold text-lg">
<div className="fw-semi-bold text-lg">
Set the number of days a vote is active. A decision expires if voting
is not completed within this period.
</div>
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"bw:build:testing": "npm run bw:build:instance --instance=treasury-testing.near",
"bw:build:infinex": "npm run bw:build:instance --instance=treasury-infinex.near",
"bw:build:infinex-testing": "npm run bw:build:instance --instance=treasury-testing-infinex.near",
"bw:build:templar": "npm run bw:build:instance --instance=treasury-templar.near",
"build:sandbox": "cd sandboxrpc && cargo build",
"gateway": "bw ws dev -g web4/public_html",
"dry-run:instances": "cd ./build/$npm_config_instance && bos components diff $npm_config_instance network-config mainnet",
Expand All @@ -50,6 +51,8 @@
"dry-run:infinex-testing": "npm run bw:build:infinex-testing && npm run dry-run:instances --instance=treasury-testing-infinex.near",
"deploy:infinex-testing": "npm run bw:build:infinex-testing && cd ./build/treasury-testing-infinex.near && bos components deploy",
"dry-run:infinex": "npm run bw:build:infinex && npm run dry-run:instances --instance=treasury-infinex.near",
"deploy:templar": "npm run bw:build:templar && cd ./build/treasury-templar.near && bos components deploy",
"dry-run:templar": "npm run bw:build:templar && npm run dry-run:instances --instance=treasury-templar.near",
"test": "npx playwright test",
"test:watch:codespaces": "npm test -- --ui-host=0.0.0.0"
},
Expand Down
10 changes: 10 additions & 0 deletions playwright-tests/tests/settings/voting-duration.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,16 @@ test.describe("User is logged in", function () {
await page.waitForTimeout(500);
await page.locator("button", { hasText: "Submit" }).click();

// check if there is any change in existing requests duration
await page.waitForTimeout(2_000);
const proceedButton = await page.locator(".modalfooter button", {
hasText: "Yes, proceed",
});

if (await proceedButton.isVisible({})) {
await proceedButton.click();
}

const description = {
title: "Update policy - Voting Duration",
summary: `theori.near requested to change voting duration from ${currentDurationDays} to ${newDurationDays}.`,
Expand Down
Loading