Skip to content

Conversation

@joeizang
Copy link
Collaborator

No description provided.

@joeizang joeizang self-assigned this Sep 15, 2025
@joeizang joeizang added the WIP label Sep 15, 2025
@netlify
Copy link

netlify bot commented Sep 15, 2025

Deploy Preview for reliable-cocada-166884 ready!

Name Link
🔨 Latest commit fc403c3
🔍 Latest deploy log https://app.netlify.com/projects/reliable-cocada-166884/deploys/69173e25d2b1df00089c5da1
😎 Deploy Preview https://deploy-preview-6378--reliable-cocada-166884.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@joeizang joeizang marked this pull request as draft September 29, 2025 13:04
@joeizang joeizang marked this pull request as ready for review October 24, 2025 09:44
version: packageJson.version,
icon: '',
location: 'none',
methods: ['getWorkspaces', 'createWorkspace', 'renameWorkspace', 'deleteWorkspace', 'getCurrentWorkspace', 'setWorkspace'],
Copy link
Contributor

Choose a reason for hiding this comment

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

can you explain this change?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

the plugin doesn't fit in either mainpanel, sidePanel so I used none like remixAIPlugin for example

>
{ section.cells.map((cell, index) => {
return <RemixUIGridCell
plugin={this}
Copy link
Contributor

Choose a reason for hiding this comment

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

is that change related?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes see comment below. tldr is plugin is not used in the component

}

console.log('templates', templates(window._intl, this))
return (
Copy link
Contributor

Choose a reason for hiding this comment

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

remove log

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

removed

<RemixUIGridCell
plugin={this}
// plugin={this}
title={item.displayName}
Copy link
Contributor

Choose a reason for hiding this comment

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

same

<platformContext.Provider value={props.app.platform}>
<onLineContext.Provider value={online}>
<AppProvider value={value}>
{isAiWorkspaceBeingGenerated && <AiWorkspaceGeneration></AiWorkspaceGeneration>}
Copy link
Contributor

Choose a reason for hiding this comment

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

are you still using this? AiWorkspaceGeneration

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this is now removed

{section.providers.map(provider => (
<RemixUIGridCell
plugin={this}
// plugin={this}
Copy link
Contributor

Choose a reason for hiding this comment

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

why this change?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

plugin is not used in the GridCell component. I found it confusing when I was reading the code and commented it out so I would understand that it isn't being used. see

props.plugin.on(props.plugin.name, 'expandGridCell', listenOnExpand)

}, [])

useEffect(() => {
console.log('state', state)
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove log

const facade = new TemplateExplorerModalFacade(plugin, appContext, dispatch, state)
const templateCategoryStrategy = new TemplateCategoryStrategy()

useEffect(() => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we merge code in some UseEffects here?

}, [strategy.contractType, strategy.contractOptions, strategy.contractAccessControl, strategy.contractUpgradability, strategy.contractName, strategy.contractTag])

useEffect(() => {
console.log('strategy', strategy)
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove log

}, [strategy])

const switching = (value: 'erc20' | 'erc721' | 'erc1155') => {
console.log('switching', value)
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove log

useEffect(() => {
const run = async () => {
const readMe = await facade.getTemplateReadMeFile(state.workspaceTemplateChosen.value)
console.log('readMe', readMe)
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove log

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

@@ -0,0 +1,162 @@
import React, { useState } from 'react'
Copy link
Collaborator

Choose a reason for hiding this comment

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

name of this file is not very well signifying the usage of it. Either update the name or add comment on the top of file to explain its usage

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added comments to the component

{dedupedTemplates?.map((template: TemplateCategory, templateIndex) => (
<div key={template.name} className="template-category mb-4" data-id={`template-category-${template.name}`}>
<h4 className="category-title mb-3 text-dark" style={{
color: '#667',
Copy link
Collaborator

Choose a reason for hiding this comment

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

if possible, avoid this much inline styling. Use built-in classed when possible

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

some most of these there are no bootstrap classes for them, hover states and the like. I have cleaned this up and added them to the css file for the react library.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

data-id={`template-card-${item.value}-${itemIndex}`}
key={`${templateIndex}-${itemIndex}`}
className="template-card bg-light border-0"
style={{
Copy link
Collaborator

Choose a reason for hiding this comment

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

same here & below at multiple places in this file

if (!remixconfigExists) {
await plugin.call('fileManager', 'writeFile', '/remix.config.json', JSON.stringify({ project: targetFolder, version: '1.0.0', IDE: window.location.hostname }, null, 2))
}
if (!remixconfigExists1) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

you check if file doesn't exist then remove it. This logic is weird. This implementation needs improvement.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This has since been fixed.

@joeizang joeizang requested a review from Aniket-Engg November 13, 2025 21:42
dispatch({ type: ContractWizardAction.CONTRACT_TYPE_UPDATED, payload: value })
dispatch({ type: ContractWizardAction.CONTRACT_TAG_UPDATE, payload: value.toUpperCase() })
dispatch({ type: TemplateExplorerWizardAction.SET_WORKSPACE_NAME, payload: value === 'erc20' ? 'ERC20' : value === 'erc721' ? 'ERC721' : 'ERC1155' })
dispatch({ type: TemplateExplorerWizardAction.SET_WORKSPACE_TEMPLATE, payload: value === 'erc20' ? { value: 'ozerc20', displayName: 'ERC20', tagList: ["ERC20", "Solidity"], description: 'A customizable fungible token contract' } : value === 'erc721' ? { value: 'ozerc721', displayName: 'ERC721', tagList: ["ERC721", "Solidity"], description: 'A customizable non-fungible token (NFT) contract' } : { value: 'ozerc1155', displayName: 'ERC1155', tagList: ["ERC1155", "Solidity"], description: 'A customizable multi token contract' } })
Copy link
Collaborator

Choose a reason for hiding this comment

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

this much code in one line using tertiary operator should be avoided

}

if (rule.type === 'exactMatch') {
if (rule.field === 'displayName' && displayName === rule.value) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

these two if statements can be merged in one

Copy link
Collaborator

@Aniket-Engg Aniket-Engg left a comment

Choose a reason for hiding this comment

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

Creating a workspacce more than once doesn't show the right name on the modal but only after modal closing

@joeizang
Copy link
Collaborator Author

Creating a workspacce more than once doesn't show the right name on the modal but only after modal closing

can you explain a bit more. Not sure what you mean

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-review PR ready to review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants