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(explorer): multi-line sql editor #3311

Merged
merged 15 commits into from
Oct 23, 2024
Merged

feat(explorer): multi-line sql editor #3311

merged 15 commits into from
Oct 23, 2024

Conversation

karooolis
Copy link
Contributor

@karooolis karooolis commented Oct 21, 2024

CleanShot 2024-10-23 at 10 24 39

Copy link

changeset-bot bot commented Oct 21, 2024

🦋 Changeset detected

Latest commit: 53d90c0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 25 packages
Name Type
@latticexyz/explorer Patch
@latticexyz/abi-ts Patch
@latticexyz/block-logs-stream Patch
@latticexyz/cli Patch
@latticexyz/common Patch
@latticexyz/config Patch
create-mud Patch
@latticexyz/dev-tools Patch
@latticexyz/faucet Patch
@latticexyz/gas-report Patch
@latticexyz/protocol-parser Patch
@latticexyz/react Patch
@latticexyz/recs Patch
@latticexyz/schema-type Patch
solhint-config-mud Patch
solhint-plugin-mud Patch
@latticexyz/stash Patch
@latticexyz/store-indexer Patch
@latticexyz/store-sync Patch
@latticexyz/store Patch
@latticexyz/utils Patch
@latticexyz/world-module-erc20 Patch
@latticexyz/world-module-metadata Patch
@latticexyz/world-modules Patch
@latticexyz/world Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@karooolis karooolis changed the title fix(explorer): various explore fixes fix(explorer): explore table improvements Oct 21, 2024
@karooolis karooolis changed the title fix(explorer): explore table improvements feat(explorer): multi-line sql editor Oct 23, 2024
@karooolis karooolis marked this pull request as ready for review October 23, 2024 07:25
)}
/>

<Button className="absolute right-1 top-1 h-8 px-4" type="submit">
<Button className="absolute bottom-1 right-1 h-8 px-4" type="submit">
Copy link
Member

@holic holic Oct 23, 2024

Choose a reason for hiding this comment

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

no change needed here but just wanted to note that I've found using position relative/absolute to create stacking contexts ends up being more trouble than its worth, because you end up fighting z-index or weird layering of things like modals etc.

now that we have grids, I now tend to use an approach like

<div className="grid">
  <div className="col-start-1 row-start-1">
    ...
  </div>
  <div className="col-start-1 row-start-1">
    ...
  </div>
</div>

obviously you can get more nuanced with this where you define an actual grid with template rows/cols and allow the top layer to take up only as much room as needed, but I only reach for that when I need to be specific about placement/alignment/spacing

another thing to note about this strategy is that the top layer (if using a full-size layer) will take over as the click target, so also need to use something like pointer-events-none on the layer's container and pointer-events-auto in each child

Copy link
Contributor Author

Choose a reason for hiding this comment

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

interesting, but still not sure how would you handle layouts where an element has to exit the normal flow? For example, in this case, I want the Run button to float above the editor. Or would you suggest to avoid "floating" layouts in general, and go for layouts with normal flow whenever possible?

holic
holic previously approved these changes Oct 23, 2024
Copy link
Member

@holic holic left a comment

Choose a reason for hiding this comment

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

looks like there's a white left border/line where there's indentation? any way to darken that a tad?

otherwise lgtm!

…Address]/explore/useQueryValidator.ts

Co-authored-by: Kevin Ingersoll <[email protected]>
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