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

[feat] Custom Examples #128

Open
wants to merge 26 commits into
base: dev
Choose a base branch
from
Open

[feat] Custom Examples #128

wants to merge 26 commits into from

Conversation

Denis-Dinkov
Copy link
Collaborator

  • Load custom examples
  • Save and edit examples
  • Improve UI
  • Fix authorization issues
  • Share examples
  • Load examples from other users

Copy link

github-actions bot commented Oct 30, 2024

Visit the preview URL for this PR (updated for commit 2e52271):

https://devground-dev--pr128-snippets-djl76of3.web.app

(expires Tue, 12 Nov 2024 17:17:36 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: e50593071dcd46506823ee35f790c6b8712eb00e

connectInjectedExtension,
getInjectedExtensions,
});
const initializeStores = async () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

is this async necessary? As far as I can see there are other async init store functions (initStoreAuth, initStoreChainClient)

src/components/exampleNotFound/index.tsx Show resolved Hide resolved
src/stores/auth/index.ts Outdated Show resolved Hide resolved
src/components/login/callback.tsx Outdated Show resolved Hide resolved
src/components/modals/modalDeleteExample/index.tsx Outdated Show resolved Hide resolved
src/stores/examples/index.ts Outdated Show resolved Hide resolved
src/stores/examples/index.ts Outdated Show resolved Hide resolved
Comment on lines 114 to 163
<li
key={example.id}
className={cn(
'flex items-center justify-between',
'transition-[background] duration-300',
'cursor-pointer',
'hover:bg-dev-black-900 hover:dark:bg-dev-purple-200',
{
['bg-dev-black-800 dark:bg-dev-purple-300']: selectedExample === example.name,
},
)}
>
<button
data-example-index={example.id}
onClick={handleChangeExample}
className={cn(
'flex w-full items-center justify-between',
'px-4 py-3.5',
)}
>
<p className="font-geist text-dev-white-200 font-body2-regular dark:text-dev-black-1000">
{truncateString(example.name, 60)}
</p>
</button>
<div className={cn(
'flex gap-2',
'px-4 py-3.5',
'text-dev-white-1000 dark:text-dev-black-300',
)}
>
<span
data-example-index={example.id}
onClick={handleEditExample}
>
<Icon
name="icon-pen"
size={[17]}
/>
</span>
<span
data-example-index={example.id}
onClick={handleDeleteExample}
>
<Icon
name="icon-trash"
size={[17]}
/>
</span>
</div>
</li>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it worth extracting this in separate component?

@DimitarTAtanasov
Copy link
Collaborator

Did we decided to remove the functionality for checking whether changes are made for the selected example and based on the result to show/hide save button?

@DimitarTAtanasov
Copy link
Collaborator

BUG:

  • go to home page
  • click 'developer console'

Result: nothing is loaded (the url is not updated to point to the default example)

@DimitarTAtanasov
Copy link
Collaborator

DimitarTAtanasov commented Oct 31, 2024

BUG:
Precondition: I don't have any custom examples
Steps:

  • go to console page
  • go to custom examples dropdown
  • click on create example

Result: redirected to the default example

Expected: Blank example(should be confirmed)

@DimitarTAtanasov
Copy link
Collaborator

BUG:

  • create custom example and save it
  • delete the custom example

Result: Still able to see the example code, also the select example dropdown still shows the deleted example name

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.

2 participants