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

Aspects Page: Expand/Collapse nested objects + Copy JSON #6563

Merged
merged 9 commits into from
Oct 19, 2022

Conversation

luvkapur
Copy link
Member

@luvkapur luvkapur commented Oct 19, 2022

Proposed Changes

  • Allow expanding/collapsing config/data for nested objects in aspects page
  • Allow copying config/data json

@luvkapur luvkapur requested a review from GiladShoham October 19, 2022 16:36
@luvkapur luvkapur changed the title Aspects Page: Expand/Collapse nested objects Aspects Page: Expand/Collapse nested objects + Copy JSON Oct 19, 2022
@luvkapur luvkapur enabled auto-merge (squash) October 19, 2022 18:27
}

.toolbar {
flex-direction: row;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

row is by default. I think you can remove this line

}
.copyIcon {
display: flex;
font-size: var(--bit-p-xs);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add default size

box-sizing: border-box;
border: none;
background-color: var(--bit-bg-color-highlight);
color: var(--bit-accent-color);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also default colors

@@ -11,12 +16,10 @@ export type AspectBoxProps = {
data: any;
} & React.HTMLAttributes<HTMLDivElement>;

const collapsedIcon = 'https://static.bit.dev/bit-icons/collapse.svg';
const expandIcon = 'https://static.bit.dev/bit-icons/expand.svg';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we're doing the same in component drawer so maybe we can make a component and use in both?

* @todo extract to a separate component
*/

function DisplayJsonTree({ object, title }: { object: any; title: string }) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any?

@luvkapur luvkapur merged commit 85cee56 into master Oct 19, 2022
@luvkapur luvkapur deleted the aspects-tab-expand-collapse branch October 19, 2022 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants