Open in IDE for bloks derived components

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
This commit is contained in:
Luke De Feo
2023-04-27 07:28:41 -07:00
committed by Facebook GitHub Bot
parent 7cc1a1246e
commit 4fdfbdc8df
3 changed files with 7 additions and 4 deletions

View File

@@ -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>
);

View File

@@ -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> = () => {

View File

@@ -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>;