Skip to content

Commit

Permalink
Open in IDE for bloks derived components
Browse files Browse the repository at this point in the history
Summary:
* Added line number as an attribute to node, in theory we could get it from the device in the case of compose
* dont need to use miles as have the file already
* cleaned up naming in ide file resolver so its clear its the qualified name we are talking about

Reviewed By: lblasa

Differential Revision: D45079135

fbshipit-source-id: 24f2d5814800a4a404b680599d307cc750758fcd
  • Loading branch information
Luke De Feo authored and facebook-github-bot committed Apr 27, 2023
1 parent 7cc1a12 commit 4fdfbdc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ export const IdentityInspector: React.FC<Props> = ({node}) => {
</Row>

<CodeInspector
name={node.qualifiedName}
qualifiedName={node.qualifiedName}
tags={node.tags}
androidId={node.inlineAttributes['id']}
lineNumber={node.lineNumber}
/>
</IdentityContainer>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import {Tag} from '../../../../types';

type CodeInspectorProps = {
tags: Tag[];
name: string;
qualifiedName: string;
lineNumber?: number;
androidId?: string;
};
export const CodeInspector: React.FC<CodeInspectorProps> = () => {
Expand Down
5 changes: 3 additions & 2 deletions desktop/plugins/public/ui-debugger/types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,9 @@ export type NestedNode = {

export type UINode = {
id: Id;
parent?: Id; //this attribute doesn't come from the client and is set by the desktop
qualifiedName: string;
parent?: Id;
qualifiedName: string; //this is the name of the component plus qualification so myles has a chance of finding it. E.g com.facebook.MyView
lineNumber?: number;
name: string;
attributes: Record<MetadataId, Inspectable>;
inlineAttributes: Record<string, string>;
Expand Down

0 comments on commit 4fdfbdc

Please sign in to comment.