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

feat: UI Text and Error message changes #262

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
4 changes: 3 additions & 1 deletion src/visualBuilder/components/CommentIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,10 @@ export default function CommentIcon(props: CommentIconProps) {
className={classNames(
"visual-builder__button visual-builder__button--secondary",
visualBuilderStyles()["visual-builder__button"],
visualBuilderStyles()["visual-builder__button--secondary"]
visualBuilderStyles()["visual-builder__button--secondary"],
visualBuilderStyles()["visual-builder__tooltip"]
)}
data-tooltip={"Add comment"}
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
Expand Down
4 changes: 1 addition & 3 deletions src/visualBuilder/components/CslpError.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ export function CslpError({}: CslpErrorProps) {
>
<p>Invalid CSLP tag</p>
<span>
Due to the invalid CSLP tag, the related Contentstack
field cannot be identified, and therefore, the content
cannot be modified.
The CSLP is invalid or incorrectly generated.
</span>
</div>
) : null}
Expand Down
20 changes: 15 additions & 5 deletions src/visualBuilder/components/FieldToolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,10 @@ function FieldToolbarComponent(
"visual-builder__button visual-builder__button--secondary visual-builder__button--edit",
visualBuilderStyles()["visual-builder__button"],
visualBuilderStyles()["visual-builder__button--secondary"],
visualBuilderStyles()["visual-builder__button--edit"]
visualBuilderStyles()["visual-builder__button--edit"],
visualBuilderStyles()["visual-builder__tooltip"]
)}
data-tooltip={"Edit"}
onClick={(e) => {
// TODO the listener for field path is attached to the common parent requiring
// propagation to be stopped, should ideally only attach onClick to fieldpath dropdown
Expand All @@ -161,8 +163,10 @@ function FieldToolbarComponent(
className={classNames(
"visual-builder__replace-button visual-builder__button visual-builder__button--secondary",
visualBuilderStyles()["visual-builder__button"],
visualBuilderStyles()["visual-builder__button--secondary"]
visualBuilderStyles()["visual-builder__button--secondary"],
visualBuilderStyles()["visual-builder__tooltip"]
)}
data-tooltip={"Replace"}
data-testid={`visual-builder-replace-${fieldType}`}
onClick={(e) => {
e.stopPropagation();
Expand Down Expand Up @@ -229,8 +233,10 @@ function FieldToolbarComponent(
],
visualBuilderStyles()[
"visual-builder__button--secondary"
]
],
visualBuilderStyles()["visual-builder__tooltip"]
)}
data-tooltip={direction.value === "vertical"?"Move up":"Move left"}
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
Expand Down Expand Up @@ -262,8 +268,10 @@ function FieldToolbarComponent(
],
visualBuilderStyles()[
"visual-builder__button--secondary"
]
],
visualBuilderStyles()["visual-builder__tooltip"]
)}
data-tooltip={direction.value === "vertical"?"Move down":"Move right"}
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
Expand Down Expand Up @@ -295,8 +303,10 @@ function FieldToolbarComponent(
],
visualBuilderStyles()[
"visual-builder__button--secondary"
]
],
visualBuilderStyles()["visual-builder__tooltip"]
)}
data-tooltip={"Delete"}
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
Expand Down
4 changes: 3 additions & 1 deletion src/visualBuilder/components/addInstanceButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ function AddInstanceButtonComponent(
visualBuilderStyles()["visual-builder__add-button"],
{
"visual-builder__add-button--with-label": props.label,
}
},
visualBuilderStyles()["visual-builder__tooltip"]
)}
data-tooltip={"Add section"}
data-testid="visual-builder-add-instance-button"
disabled={disabled}
title={
Expand Down
3 changes: 1 addition & 2 deletions src/visualBuilder/components/emptyBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ export function EmptyBlock(props: EmptyBlockProps): JSX.Element {
visualBuilderStyles()["visual-builder__empty-block-title"]
)}
>
There are no {blockParentName.toLowerCase()} to show in this
section.
There are no {blockParentName.toLowerCase()} on this page yet. Click the button below to add one.
</div>
<button
className={classNames(
Expand Down
1 change: 0 additions & 1 deletion src/visualBuilder/visualBuilder.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,6 @@ export function visualBuilderStyles() {
position: absolute;

bottom: 20px;
left: -16px;
margin-bottom: 16px;

padding: 12px;
Expand Down
Loading