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

fix(components): fix contract card and states ui #693

Merged
merged 4 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from 3 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 CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Bug fixes

- [#693](https://github.com/alleslabs/celatone-frontend/pull/693) Fix ui styling for contract card and states
- [#687](https://github.com/alleslabs/celatone-frontend/pull/687) Fix resource and module related bugs
- [#690](https://github.com/alleslabs/celatone-frontend/pull/690) Fix query msg regex for Sylvia contract
- [#689](https://github.com/alleslabs/celatone-frontend/pull/689) Fix execute msg regex for Sylvia contract
Expand Down
12 changes: 9 additions & 3 deletions src/lib/components/table/contracts/ContractsTableMobileCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { RemarkOperation } from "lib/types";
import { dateFromNow, formatUTC } from "lib/utils";

import { ContractInstantiatorCell } from "./ContractInstantiatorCell";
import { ContractNameCell } from "./ContractNameCell";

interface ContractsTableMobileCardProps {
contractInfo: ContractInfo;
Expand Down Expand Up @@ -59,10 +58,17 @@ export const ContractsTableMobileCard = ({
</Flex>
}
middleContent={
<Flex gap={3} direction="column">
<Flex gap={3} direction="column" maxW="full">
<Flex direction="column">
<MobileLabel label="Contract Name" />
<ContractNameCell contractLocalInfo={contractInfo} isReadOnly />
<Text
variant="body2"
maxW="full"
color="text.main"
wordBreak="break-all"
>
{contractInfo.name ?? contractInfo.label}
</Text>
</Flex>
<Flex direction="column">
<InstantiatorRemark remark={contractInfo.remark} />
Expand Down
1 change: 1 addition & 0 deletions src/lib/pages/contract-details/components/ContractTop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ export const ContractTop = ({
ml={{ base: 1, md: 0 }}
variant={{ base: "h6", md: "h5" }}
className={!isMobile ? "ellipsis" : ""}
wordBreak="break-word"
>
{displayName}
</Heading>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ export const StateLoader = ({
borderRadius={8}
bgColor="gray.900"
p={3}
alignItems="center"
alignItems={{ base: "flex-start", md: "center" }}
justifyContent="space-between"
direction={{ base: "column", md: "row" }}
>
{isLoading ? (
<Flex gap={4} alignItems="center">
Expand Down Expand Up @@ -59,6 +60,8 @@ export const StateLoader = ({
)}
<Button
size="sm"
mt={{ base: 3, md: 0 }}
w={{ base: "full", md: "auto" }}
variant="outline-primary"
disabled={isLoading}
onClick={onDownload}
Expand Down
4 changes: 1 addition & 3 deletions src/lib/pages/upload/completed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,7 @@ export const UploadComplete = observer(({ txResult }: UploadCompleteProps) => {
</Flex>
)}
<Button
rightIcon={
<CustomIcon name="chevron-right" boxSize={4} color="text.dark" />
}
rightIcon={<CustomIcon name="chevron-right" boxSize={4} />}
w="full"
mt={attached ? 8 : 0}
mb={4}
Expand Down
Loading