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

🛠️ Improvements to hot-updater console #46

Open
gronxb opened this issue Jan 16, 2025 · 5 comments
Open

🛠️ Improvements to hot-updater console #46

gronxb opened this issue Jan 16, 2025 · 5 comments

Comments

@gronxb
Copy link
Owner

gronxb commented Jan 16, 2025

console.mov

https://gronxb.github.io/hot-updater/guide/console.html

Currently, it works as described above.

It allows for:

  • Rollback
  • Force update
  • Reassigning the app target version
  1. First, I am not a designer, so I think it looks a bit unattractive. I would appreciate any contributions to improve the design.
  2. Second, I am looking into whether there are additional features that might be needed.

If a comment receives a lot of upvotes, I plan to work on additional improvements based on the suggestions.

@gronxb gronxb pinned this issue Jan 16, 2025
@dougg0k
Copy link

dougg0k commented Jan 17, 2025

  • What about when a repo is private?

  • It seem to be lacking the actual version of the OTA update, if that is even a thing.

  • So, being based on git commits, it means you dont need to generate the bundle, is it generated for you? How does that work?

    • If it's because the storage bundles are there, how is it tying a commit to the bundle?

As for the design, it's nice enough. I have a few suggestions.

  • You could add a dark theme.
  • And an option to add a note, in case you need help remembering something about a specific update.

@gronxb
Copy link
Owner Author

gronxb commented Jan 17, 2025

It seems like I may have written in a way that could cause misunderstanding. When deploying, if you’re using Git, the current Git commit hash is stored alongside the database. This allows you to associate the bundle files with the corresponding commit hash. The gitUrl used in the console is solely for navigation purposes, letting you locate which commit the bundle originated from.

Therefore, it doesn’t matter whether the repository is private or not—it’s purely for navigation purposes.

<a
  href={`${gitInfo().gitUrl}/commit/${gitInfo().gitCommitHash}`} // console.gitUrl + bundle.gitCommitHash
  target="_blank"
  rel="noreferrer"
  class="text-xs text-muted-foreground"
>
  Commit Hash: {gitInfo().gitCommitHash.slice(0, 8)}
</a>

It looks like I forgot to include the console.gitUrl setup in the demo video, so I’ll revise and prepare it again. Thank you!


You can visit below link:
https://gronxb.github.io/hot-updater/guide/console.html#git-url

@Ashish-K1
Copy link

Ashish-K1 commented Feb 5, 2025

Hi @dougg0k @gronxb

packages/react-native/src/wrap.tsx

In the function wrap we should include the props passing

As the wrapped HOC do not having the props included in the final return WrappedComponent, therefore its good to include it.
💯 👍

export function wrap<P>(
  config: HotUpdaterConfig,
): (WrappedComponent: React.ComponentType) => React.ComponentType<P> {
  const { reloadOnForceUpdate = true, ...restConfig } = config;
  return (WrappedComponent) => {
    const HotUpdaterHOC: React.FC<P> = (props: P) => {
      const { progress } = useHotUpdaterStore();
      const [status, setStatus] = useState<
        "IDLE" | "CHECK_FOR_UPDATE" | "UPDATING" | "UPDATE_PROCESS_COMPLETED"
      >("IDLE");

| |
| |
| |

  return <WrappedComponent {...props} />;
};

return HotUpdaterHOC;

};
}`

Please feel free to ask question or usecase for adding these here.

Thanks
Ashish
[email protected]

@dougg0k
Copy link

dougg0k commented Feb 5, 2025

@Ashish-K1
Copy link

Hi @gronxb

When we are planning to include the AWS Only S3 Provider with the Hot Updater library.

cc @dougg0k

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

No branches or pull requests

3 participants