Code Monkey home page Code Monkey logo

web's Issues

πŸ“ Clarify dagre layouting example.

The current dagre example initialises the layouting graph just once and will not work if new nodes are added or removed.

We should either clarify this limitation of the example (and suggest how one may overcome it) or update the example to work on dynamic graphs.

Feat: search

We need to find a way to define a separate index for React Flow and Svelte Flow, so that you only get Svelte related results when you are under /svelte-flow.

Ideas to solve this:

  • create a docsearch for the current staging domain and see if that's configurable somehow
  • create our own index with algolia
  • check out other search frameworks / services

Docs: Add section about initial node size

It's confusing that width and height can be passed as node options but they don't have any effect. The recommended way of passing an initial size to a node is to set the style option. Maybe we can document that somewhere?

Restructure API docs

I'm not super happy with how our current API reference is organised; although it surfaces all the important information quickly it does so in a seemingly unstructured way. I want to use this issue to collect some references of other package and API docs and see if we can come up with something clearer.

Component docs:

Hook docs:

API docs:

These ones are not so relevant to us (we're not documenting a HTTP API) but I still find the way they present information interesting.

Feat: Svelte examples viewer

Currently we can't display svelte examples on our website. We wanted to use sandpack / codesandbox but for some reasons it doesn't work.

I opened an issue in the sandpack repo codesandbox/sandpack#961 and one in the codesandbox-client repo codesandbox/codesandbox-client#7750 . My hope is that by updating their internal Svelte transpiling pipeline the issues just go away, but that's not for sure. For now I would like to wait for another one or two weeks and see if there is any progress with those issues. On Discord they told me that someone will look into it.

If there are any other ideas besides embedding a Stackblitz iframe, here is the place to collect those ideas.

Write up Repo documentation

Before publishing it, we should add some more context and information to the repo and explain what you can do with it.

  • readme
    • intro image (ask facu for dark mode)
    • overview on what the repo contains and how its structured
    • installation and turborepo
    • how to run individual apps
    • staging and production urls
    • xyflow pro ad
    • contact us
  • contributing
    • git workflow (also for ourselves)
  • license
    • MIT
  • ethical standards / code of conduct
    • same as in react-flow repo or just reference to it?
  • issue template?
    • this will most often be used for issues in the docs
  • changelog?
    • not sure how we'll do it for the individual apps
  • sponsor button?
    • can we add a link to xyflow pro?

Download Image example resulting image is cropped

Description

I want to implement full diagram PNG export.
The documentation contains an example using html-to-image library about downloading the diagram as PNG:

Unfortunately, the image downloaded from the example is cropped on large diagrams. This should not happen judging by the comment:

// we calculate a transform for the nodes so that all nodes are visible

In addition the image is very pixelated.

Setting pixelRatio: 4 seems to fix the pixelation, but I was unable to stop the image cropping.

Expected behavior

The documentation should contain an example on downloading full diagram as PNG that:

  • Is high quality
  • Does not crop the image
2023-09-03.20-04-21.mp4

Wire up contact forms

Investigate which service is suitable for us and connect our contact forms (general + enterprise) to it.

πŸ› Make blog post previews more accessible.

Image

Our blog post previews are the classic "buttons that work like links". I found this really surprising when, for example, cmd+clicking one of these cards didn't open a new tab but instead navigated the current tab.

I think it would be better if the whole card were an anchor rather than the Read more (which incidentally cmd+clicking on will still navigate the current page).

Example: connection line (react/svelte)

Make it a bit more interesting by showing three handles at the bottom (green/orange/red) - depending where you start the edge, the connection line should be green, orange or red.

Page: Blog post

  • Implement design
    • Warning/notice components
    • Widescreen images and code snippets.
    • Image captions

Desktop

Docs: fix dev warnings

  • Hydration errors

I think these can be fixed by removing the <Link /> component within a <ContentGridItem /> that has a route prop (for example in LibraryCards).

Screen Shot 2023-08-10 at 14 37 00
  • Next Image Warnings

Not sure what's the best way to configure the Next image components in the showcase slider.

Screen Shot 2023-08-10 at 14 36 41

document new CSS variables

with the new release, we are introducing CSS variables as another option to customize the default styling of xyflow. We should document the available variables somehow:

--edge-stroke-default: #b1b1b7;
  --edge-stroke-width-default: 1;
  --edge-stroke-selected-default: #555;

  --connectionline-stroke-default: #b1b1b7;
  --connectionline-stroke-width-default: 1;

  --attribution-background-color-default: rgba(255, 255, 255, 0.5);

  --minimap-background-color-default: #fff;

  --background-pattern-dot-color-default: #91919a;
  --background-pattern-line-color-default: #eee;
  --background-pattern-cross-color-default: #e2e2e2;
  --node-color-default: inherit;
  --node-border-default: 1px solid #1a192b;
  --node-background-color-default: #fff;
  --node-group-background-color-default: rgba(240, 240, 240, 0.25);
  --node-boxshadow-hover-default: 0 1px 4px 1px rgba(0, 0, 0, 0.08);
  --node-boxshadow-selected-default: 0 0 0 0.5px #1a192b;

  --handle-background-color-default: #1a192b;
  --handle-border-color-default: #fff;

  --selection-background-color-default: rgba(0, 89, 220, 0.08);
  --selection-border-default: 1px dotted rgba(0, 89, 220, 0.8);

  --controls-button-background-color-default: #fefefe;
  --controls-button-background-color-hover-default: #f4f4f4;
  --controls-button-color-default: inherit;
  --controls-button-color-hover-default: inherit;
  --controls-button-border-color-default: #eee;
  --controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, 0.08);

Page: Case Studies

  • Add content for the other case studies
  • make the OneSignal screenshot better (refer to the Doubleloop screenshot)
  • change drop shadow behind image to the nice gradient border in Facu's design
  • Make this linked from the Pro page
  • Add closing element above footer on overview page (check Facu's designs)
  • Improve readability with font style changes (reference other newspaper interview websites, how they style the questions vs. answers (waiting for #56)
  • change button to pro variation at the bottom of case study page

Examples are not beginner friendly

Describe the Bug

The demo code on https://reactflow.dev/docs/examples/overview/ does not run correctly on the latest version because of the missing width and height

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

  1. Initialize project with npm init react-app <app_name>
  2. Copy the code for App.js and initial-elements.js from https://reactflow.dev/docs/examples/overview/
  3. npm start

Expected behavior

What's shown in the feature overview

Screenshots or Videos

image
The app worked after adding the height
image

Platform

  • OS: Linux
  • Browser: Chrome/Firefox
  • Version: Chrome 103.0.5060.53 , Firefox 103.0.2

Additional context

No response

Unable to use <Text> component from xy-ui in Case Study markdown file

When adding a component inside of a case study markdown file, an error is thrown. Maybe because it's inside of the component?

See commit (this code throws the below error): bf8b12a

Server Error
Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

This error happened while generating the page. Any console logs will be displayed in the terminal window.

Trying to make this change to make the answer text in the Case Studies more easily scannable, referencing style of interviews like this one

Page: About

  • Make the timeline UI into just a paragraph of text (maybe with an image above it?)
  • Find / create a new image for our footer that includes the whole team
  • Create high-fidelity image to use at top of about page to replace current draft image

Replace hardcoded urls with env variables

urls linking to pro platform and svelte examples are currently hardcoded. To have an encapsulated staging and production environment we should link these urls should be set in vercel for each environment seperately

βš—οΈ Experiment generating JSON containing public type info from a TS module.

With the current React Flow docs site, we hand-maintain an object that contains the type information for things like interfaces and functions and then use that to render an API reference. It'd be much nicer if we could derive that object as JSON by just parsing the modules we care about documenting.

This kills two birds with one stone because it'll encourage us to better document the source code!


I did some initial experimentation with TSDoc, which seemed ideal because it even had a built-in JSON export option. Unfortunately it seems entirely geared up to work at the level of "packages" rather than on individual modules, and I fear that may just be overkill.

Ideally we have a local utility package that let's us do xy-export-types react/types/edges and we get just the types in that module back as JSON. Unfortunately that means the path forward looks like...

Using the typescript compiler API

The good news is you can import typescript as a package and start calling the compiler, walking the AST, etc straight from any ol' script: https://github.com/microsoft/TypeScript/wiki/Using-the-Compiler-API

The bad news is the compiler API is basically undocumented and quite complicated.

Here's the todo list in order-ish of complexity:

  • Scan a single file and export any public interfaces.
  • Export any public non-function consts.
  • Export any public functions.
  • Export any public types including union types.
  • Squash multiple source files into a single JSON output.

As a first-pass I'd like to end up with output like this:

[ { "kind": "interface"
  , "name": "EdgeLabelOptions"
  , "docs": "..."
  , "fields": 
    [ { "name": "label", "type", "string | ReactNode", "optional": true }
    , ...
    ]
  }
]

On a second go round I'd like a better representation for referenced types, so we can generate links and all that.


This issue is frustrating because there are a couple of tools out there but they seemed far more geared towards generating entirely automated docs sites, but we have Opinions about how to show off our API reference that make these unsuitable.

Opening this so I can keep track of what I'm up to and abandon it if it's eating too much time.

πŸ“ Restructure "Guides" sidebar to group things by category.

By having the API docs be purely reference material, it can be hard for users to discover slightly buried things like the NodeProps type that tells you what props are passed to a custom node.

To keep the API docs a strict reference, we think it would be useful to rethink the current "Guides" sidebar on the docs to group things based on their category or concept and then also link out to relevant API reference too.

Instead of:

  • Guides
    • Custom Nodes
    • Sub Flows
    • Layouting
    • ...

We could have

  • Nodes
    • Creating custom nodes
    • Custom node props
    • ...
  • Layouting
    • Sub flows
    • ...
  • Troubleshooting
    • Removing attribution
    • Migrating to ...

Finalize content of React Flow / Svelte Flow landing pages

  • Svelte: Replace "latest release" in stats section with current version
  • Svelte: Come up with closing element before footer (maybe the same as bottom of a Case Study page?)
  • React: Come up with closing element before footer (maybe the same as bottom of a Case Study page?)
  • Add flows inside boxes in features section @moklick
  • use Facu's node design thing for preview of Getting Started guide image in pre-footer section

Add Socials to footer

Mastodon, Bluesky, Twitter, and Discord links should be in the footer
Contact should also be there!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.