Coder Social home page Coder Social logo

icerpc / icerpc-docs Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 6.0 5.53 MB

Documentation site for IceRPC

Home Page: https://docs.icerpc.dev

License: Other

TypeScript 93.09% JavaScript 3.48% CSS 2.94% Dockerfile 0.49%
documentation icerpc markdoc slice

icerpc-docs's People

Contributors

bentoi avatar bernardnormier avatar dependabot[bot] avatar externl avatar insertcreativityhere avatar pepone avatar reecehumphreys avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

icerpc-docs's Issues

Bad word wrapping

We should not wrap a word on 2 lines like:

Customize the sequence and dictionar
y mapping.

See for example the C# attributes table.

Review lexical rules

## Reserved Identifiers
Slice reserves the identifier `Ice` and all identifiers beginning with `Ice` (in any capitalization) for the Ice
implementation. For example, if you try to define a type named `Icecream`, the Slice compiler will issue an error
message.
{% callout %}
You can suppress this behavior by using the `ice-prefix` Slice metadata directive, which enables definition of
identifiers beginning with Ice. However, do not use this directive unless you are compiling the Slice definitions for
the Ice run time itself.
{% /callout %}
Slice identifiers ending in any of the suffixes `Async`, `Disp`, `Helper`, `Holder`, `Prx`, and `Ptr` are also reserved.
These endings are used by the various language mappings and are reserved to prevent name clashes in the generated code.

I think most of this section is incorrect.

Use the screen full width

Desired feature

I think would be an improvement if the site use the screen full width. Similar to what GitHub does now.

Problem

docs-width

Alternatives

I think it would look nicer if we take advantage of the unused space in the left and right margins.

Slice Proxy documentation comments

A few comments regarding Proxy documentation

On the Interface page, we have:

Such a field or parameter (etc.) represents the address of a remote service that implements this interface, and is called a proxy. Please refer to Proxy for details.

The proxy page doesn't clearly define what a proxy is.

It starts by talking about service addresses, and interfaces, but I think we should include something like what we have in interfaces pages that make this "interface/proxy" correspondence clear.

The WidgetFactory does not return a full-blown widget, but the address of the service it just created.

I think "created" is an implementation detail, which is irrelevant in Slice, so "..., but the address of the service."

We describe this situation as createWidget returns a Widget proxy.

I think is simpler to say "We say the createWidget operation returns a Widget proxy.

When the Slice engine decodes a relative proxy from an incoming request payload

That is correct, but wouldn't it be clear for the user if we present this in terms of dispatch parameters, and invocation return value?

You need to transform this proxy before you can use it to make requests.

Transform how?

this decoded proxy is ready to go. You don't need to transform it further before making calls with this proxy.

the decoded proxy is ready for making invocations to the target service.

Can we Allow Headerless Tables?

In standard Markdown, headers are requires for tables, but there are some tables where headers just aren't needed.
For example, I'm using a table to format lists of keywords, but there's no meaningful header to put on this table, despite it being required.

Is there a way to support markdown tables that don't have headers?
If this outside the realm of possibility, is there an alternative to Markdown tables I could use for this?

Update OpenGraph image generator design

We use @vercel/og to generate open graph images that are used when links to the docs are posted around the web. Commonly these get seen in iMessage, twitter, etc as the images that show up when you share something.

We now support dynamically creating these images for each page. However, I did not but much work into the design for now. Before release we should make sure to update this.

Here is the current generated open graph image for https://docs.testing.zeroc.com/docs/slice/basics/contract-first

og-1

When to use back quotes?

The current version of the doc uses few back quotes. Benoit's PR #30 adds lots of back quotes.

Clearly, we first need to decide when we should use back quotes.

I am not in favor of using lots of back quotes because they make the text harder to read (which could be in part a rendering issue).

Color scheme for C# code

Is there any we can use the standard VS code color scheme for C# syntax highlighting?

I don't see the point in inventing on our color scheme for C#.
C# developers are used to the VS code color scheme; ours currently looks much worse.

`req.headers.host` on Docker container includes x-webdoc

Using req.headers.host for local development correct returns the hostname and port localhost:XXXX. However, when hosted on the docker container it includes x-webdoc/.../hostname:port. This causes the links generated for the feedback emails to be unable to be opened.

Slice components

Some notes regarding

https://docs.testing.zeroc.com/docs/slice/basics/slice-components

The Slice language and the Slice encoding are programming language independent: a Slice string has always the same name and encoding regardless of the programming language (or languages) you use to make RPC calls and to implement the business logic of these RPCs.

I think the word name, in "the same name and encoding" gives the impression that our encoding includes the name of things.

I also find it uncommon to say Slice (the language) is programming language independent.

Slice library code

Maybe it is clear to use another term like "Slice encoding implementation"

Add rate limiting to the API endpoints

We have two API endpoints currently. One for generating a dynamic, open graph image used for metadata and another for sending an email when feedback is received. Since we have no sessions/rate limiting, someone can spam these APIs to cause massive email spam.

We should consider adding some form of rate-limiting middleware to prevent this.

GitHub footer link

The GitHub footer link doesn't change from zeroc-ice to icerpc, when you change the product. The one in the header does.

Buggy Overview titles

Our Overview pages are not correct. The large title should (obviously) not be Overview!

It should be the section title (Getting Started, IceRPC Core etc.) but it should not be under a little title with the same words. Basically, we should do like Stripe doc, see for example:

https://stripe.com/docs/finance-automation

csharp: doesn't work with fragment

csharp: should add .html before the fragment and leave the fragment as is.

Example that should work but currently doesn't:

[features](csharp:IceRpc.IncomingRequest#IceRpc_IncomingRequest_Features)

{% addEncoding=true %} eats blank lines

Strangely this new slice option eats blank lines, e.g.

compact struct ServerAddressData {
    transportCode: TransportCode
    encapsulation: Encapsulation
}

compact struct Encapsulation {
    size: int32              // payload size + 6
    encodingMajor: uint8     // always 1
    encodingMinor: uint8     // always 1
    payload: uint8[...]      // pseudo-Slice
}

typealias TransportCode = int16

Change Default Table Formatting

Currently, we always format our tables with horizontal bars dividing rows of elements, and nothing else.
This works well for certain circumstances, but not for a general purpose table.

It would be preferable to have some way of toggling the presence of vertical/horizontal bars.
There's one place where I'd like only vertical bars, and another place where I need a real table that has a proper grid.

Color scheme

In light mode, we get colors but our use of the same blue for different meanings is confusing: it's both the color of links and titles.

In dark mode, it seems we use colors (blue) only for links which results in a pretty drab look.

Problem with anchors

Something is not right with anchors. In the attached screenshot, I used a link to go to #client-connection-configuration, and yet I was brought a little below on the page.

Improve 404 page

The 404 page is mostly empty, I think it would be good to keep at least the main header

404

Can we add a API ref link component

I'm not sure how links/components work, but the idea would be to provide a way to link the reference documentation using the type name.

The [ClientConnection](csharp:IceRpc.ClientConnection)

And then this would render the actual link

The [ClientConnection](https://docs.testing.zeroc.com/docs/icerpc-core/invocation/invocation-pipeline)

Revert updates to screenshots

Please revert the updates to the VS code screenshots. They are now very hard to read. These screenshots should use the full width, just like they did previously.

clarify "return single type"

Then I believe it would be more accurate to write "When the operation has a single return type", The way I see it, an operation has a return type, and it returns a value, which has a type matching the operation returns type.

Originally posted by @pepone in #54 (comment)

Should we use "an operation has a single return type" instead of "an operation returns a single type"?

Endianness

https://docs.testing.zeroc.com/docs/slice/encoding/main-features#little-endian

On the other hand, the ice and icerpc protocols define their frame headers and control frames using Slice; this usage favors big-endian ordering.

We selected little-endian because Slice's main job is to encode/decode the payloads of requests and responses. Its use for the ice and icerpc frame headers is secondary. And it's simpler to use the same ordering (little-endian) in all situations.

What does it mean that it favors big-endian? To me, this sounds a bit like using big-endian for the protocol would be better, but we use little-endian because it is simpler to always use the same, which I don't think is the case.

Should we add `parameterless` to the dictionary?

The spellchecker job fails here:

Warning: Unknown word (parameterless)
pages/docs/slice/language-guide/interface.md:181:34 Unknown word (parameterless)
Files checked: 5, Issues found: 1 in 1 files.
Error: 1 spelling issue found in 1 of the 5 files checked.

Add Support for HTML Comments?

This proposed syntax doesn't work with our doc setup:


The correct way to add comments in Markdown is like this:

<!-- TODO: add a link to 'identifiers::escaping' to the first paragraph -->

Originally posted by @ReeceHumphreys in #39 (comment)


Personally, I don't think this is necessary. The way I've always written markdown comments is: [comment]: <> (stuff) and that works perfectly fine for me. But I'm opening it anyways in case anyone else thinks we should add support for this.

Getting started is not good

We expect most potential users will start reading Getting started. So Getting started needs to be:

  • informative
  • not boring
  • not repetitive
  • correct

What do you see on Getting started page?

Get started with IceRPC - seriously?
Quick links (I opened another bug for this subtitle)
Check out an example project

Migrate from Mermaid V9 to Mermaid V10

The mermaid diagram rendering package had a major version release to 10.0. It would be good to migrate to it at some point in the future. Looks like it will take a bit of work though as they changed their API to async await.

Service address doc is bogus

A service address in IceRPC is not an arbitrary URI. Its protocol must be ice, icerpc or null (i.e. a relative service address).

Add compiler diagnostics section

We should add a Compiler diagnostics section that lists the errors and warnings that slicec-cs can emit.

For each error and warning, we should provide an explanation (more than the message) and when appropriate provide an example.

Too many blank lines

The removal of {% title %} introduced too many blank lines, e.g.

---
title: Client vs server connections
description: Learn how to create and accept connections in IceRPC.
---



## What are connections for?

Spell check failing

I added this because spell check job was failing,

data\icerpc-core-data.ts
140:        path: `${RPC_CORE_BASE_URL}/icerpc-protocol/mapping-rpcs-to-streams

Originally posted by @pepone in #40 (comment)

Quick links subtitles

We should not have any "Quick links" subtitles. It makes no sense.

If you look at the model - Stripe docs - there is no Quick links subtitle anywhere.

The correct layout is meaningful subtitle followed by cards.

https://stripe.com/docs

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.