Skip to content

[Refactor] migrate Explorer home to FC and enforce type safety#1157

Merged
jianliang00 merged 1 commit into
lynx-family:developfrom
Huxpro:xuan/better-eng-explorer
Jun 4, 2025
Merged

[Refactor] migrate Explorer home to FC and enforce type safety#1157
jianliang00 merged 1 commit into
lynx-family:developfrom
Huxpro:xuan/better-eng-explorer

Conversation

@Huxpro
Copy link
Copy Markdown
Collaborator

@Huxpro Huxpro commented May 19, 2025

Summary

This PR

  • migrated the Explorer home screen to Functional Components.
  • properly configuring TSConfig and make uses of <input> element typed.
  • add README to the projects.

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

);
}
return (
<view clip-radius="true" style={{ height: '100%' }}>
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@zhongyr is there a performance difference between inline styling via strings or objects?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Objects performs better, no need to separate tokens into independent property and value KVs before parsing styles.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

There is no difference between an object literal and a string literal in this context. Both are converted into a __AddInlineStyle call:

__AddInlineStyle(element, /* kHeight */ 25, '100%')

Comment thread explorer/homepage/package.json Outdated
"@lynx-js/qrcode-rsbuild-plugin": "^0.3.3",
"@lynx-js/react-rsbuild-plugin": "^0.9.8",
"@lynx-js/rspeedy": "^0.9.3",
"@lynx-js/types": "^3.3.0",
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Should have used workspace version if the type resolution works

@Huxpro
Copy link
Copy Markdown
Collaborator Author

Huxpro commented May 19, 2025

Does anyone have any clue why intrinsic elements e.g. <view> insisted to resolve to the one defined by react rather than the one we overrode to @lynx-js/types? cc @colinaaa @f0rdream

In this project:

image

In lynx-stack/examples/:

image

@colinaaa
Copy link
Copy Markdown
Collaborator

Does anyone have any clue why intrinsic elements e.g. <view> insisted to resolve to the one defined by react rather than the one we overrode to @lynx-js/types? cc @colinaaa @f0rdream

Try "jsx: "react-jsx" with "jsxImportSource": "@lynx-js/react". You may need to upgrade to @lynx-js/react v0.108.0. See lynx-family/lynx-stack#545

@Huxpro Huxpro force-pushed the xuan/better-eng-explorer branch from fd2a1b1 to ae5e8de Compare May 21, 2025 00:12
@Huxpro Huxpro changed the title wip: [Refactor] Explorer: migrate to FC and enforce type safety [Refactor] migrate Explorer home to FC and enforce type safety May 21, 2025
@Huxpro Huxpro force-pushed the xuan/better-eng-explorer branch 5 times, most recently from 08a0a08 to fe618ff Compare May 21, 2025 06:13
@Huxpro Huxpro force-pushed the xuan/better-eng-explorer branch 4 times, most recently from e77b5f2 to be3f4ac Compare May 30, 2025 09:02
@Huxpro
Copy link
Copy Markdown
Collaborator Author

Huxpro commented May 30, 2025

/land

@jianliang00
Copy link
Copy Markdown
Contributor

🛬 Landing process started! >>553.0

@jianliang00
Copy link
Copy Markdown
Contributor

🛬 Landing process started! >>554.0

@Huxpro Huxpro force-pushed the xuan/better-eng-explorer branch 3 times, most recently from 5e4de72 to 6423b2b Compare May 31, 2025 01:17
@Huxpro
Copy link
Copy Markdown
Collaborator Author

Huxpro commented May 31, 2025

/land

@jianliang00
Copy link
Copy Markdown
Contributor

🛬 Landing process started! >>557.0

@jianliang00
Copy link
Copy Markdown
Contributor

🛬 Landing process started! >>558.0

@Huxpro Huxpro force-pushed the xuan/better-eng-explorer branch from 6423b2b to aa9d769 Compare May 31, 2025 01:46
@Huxpro
Copy link
Copy Markdown
Collaborator Author

Huxpro commented May 31, 2025

/land

@jianliang00
Copy link
Copy Markdown
Contributor

🛬 Landing process started! >>559.0

@jianliang00
Copy link
Copy Markdown
Contributor

🛬 Landing process started! >>560.0

@Huxpro Huxpro force-pushed the xuan/better-eng-explorer branch from aa9d769 to 3a14d1d Compare May 31, 2025 02:07
@Huxpro
Copy link
Copy Markdown
Collaborator Author

Huxpro commented May 31, 2025

/land

@jianliang00
Copy link
Copy Markdown
Contributor

🛬 Landing process started! >>561.0

@jianliang00
Copy link
Copy Markdown
Contributor

🛬 Landing process started! >>562.0

@Huxpro Huxpro force-pushed the xuan/better-eng-explorer branch from 3a14d1d to 60b0192 Compare May 31, 2025 05:12
@Huxpro
Copy link
Copy Markdown
Collaborator Author

Huxpro commented May 31, 2025

/land

@jianliang00
Copy link
Copy Markdown
Contributor

🛬 Landing process started! >>563.0

@jianliang00
Copy link
Copy Markdown
Contributor

🛬 Landing process started! >>564.0

@Huxpro Huxpro force-pushed the xuan/better-eng-explorer branch from 60b0192 to 8423b71 Compare May 31, 2025 06:13
@Huxpro
Copy link
Copy Markdown
Collaborator Author

Huxpro commented May 31, 2025

/land

@jianliang00
Copy link
Copy Markdown
Contributor

🛬 Landing process started! >>565.0

@jianliang00
Copy link
Copy Markdown
Contributor

🛬 Landing process started! >>566.0

- migrated the Explorer home screen to Functional Components.
- properly configuring TSConfig and extend lynx-js/types.
- add README to the projects.

doc: https://github.com/lynx-family/lynx/tree/develop/explorer
@jianliang00 jianliang00 force-pushed the xuan/better-eng-explorer branch from e2a57ce to df0a3f4 Compare June 4, 2025 13:33
@jianliang00 jianliang00 merged commit 0fb99ea into lynx-family:develop Jun 4, 2025
16 checks passed
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.

4 participants