gir icon indicating copy to clipboard operation
gir copied to clipboard

Generate urls (when possible)

Open GuillaumeGomez opened this issue 9 years ago • 16 comments

GuillaumeGomez avatar May 16 '16 14:05 GuillaumeGomez

@GuillaumeGomez, if diffs line this is really what you want, then all good. But IMHO link in markdown looks like [I'm an inline-style link](https://www.google.com)

<!-- struct AboutDialog -->
-The `AboutDialog` offers a simple way to display information about
+The `./struct.AboutDialog.html` offers a simple way to display information about
 a program like its logo, name, copyright, website and license. It is
 also possible to give credits to the authors, documenters, translators

EPashkin avatar May 16 '16 18:05 EPashkin

I forgot to commit/squash/push. Sorry about that. Updated.

GuillaumeGomez avatar May 16 '16 18:05 GuillaumeGomez

Current version also not right. Ticks go inside brackets. The [AboutDialog](./struct.AboutDialog.html) offers a simple way to ... or The AboutDialog offers a simple way to ...

EPashkin avatar May 16 '16 18:05 EPashkin

Hum, right. I didn't pay attention to backticks.

GuillaumeGomez avatar May 16 '16 19:05 GuillaumeGomez

Fixed.

GuillaumeGomez avatar May 16 '16 20:05 GuillaumeGomez

I'm getting redundant Exts like this with gtk:

-Use `BoxExt::set_child_packing` to reset the expand,
+Use `BoxExtExt::set_child_packing` to reset the expand,

gkoz avatar May 16 '16 20:05 gkoz

- `Box:spacing` property. If `child` is a widget at one of the
+ [`Box:spacing`](./struct.Box.html) property. If `child` is a widget at one of the

I'm not sure it's a good idea to link property and signal references to just the struct's page. There'd be expectation that they lead somewhere useful.

gkoz avatar May 16 '16 21:05 gkoz

Generally, are you sure it'd not be better to expand analysis::symbols instead? There seem to be duplication of concerns in the making (I assume you'll want to process methods too).

gkoz avatar May 16 '16 21:05 gkoz

This is a first shot. I have a very bad understanding of all the underlying mechanisms, which lead to the code you can see now.

GuillaumeGomez avatar May 16 '16 21:05 GuillaumeGomez

The symbols module only tracks names now but it could also store types. It could be difficult to make it play nice with the struct/trait dichotomy. But in return you'd get the rest function handling for free.

gkoz avatar May 16 '16 21:05 gkoz

I fixed the "ExtExt" issue. I guess running the analysis twice created it. You'll certainly find out better than I.

GuillaumeGomez avatar May 16 '16 22:05 GuillaumeGomez

IMHO this link need hashtag (when signals added)

[`AboutDialog::activate-link`](struct.AboutDialog.html)

Also don't see reason to having link to struct.AboutDialog.html in same file.

EPashkin avatar May 17 '16 03:05 EPashkin

Possible link to wrong page

[`gio::Application::startup`](struct.Application.html) signal

Only found other possible hashtagable is properties (very few, ex. Label) and Widget::draw that can be signal or function.

Other wrong link: must link to TreeViewColumnSizing (if we have separate page for enum)

[`TreeViewColumnSizing::Fixed`](struct.Fixed.html)

EPashkin avatar May 17 '16 03:05 EPashkin

I've taken another look at analysis::symbols, it should be possible to make it track additional type information. There already is a provision for dealing with trait methods.

@EPashkin I think we've come to a point when it's necessary to make a separate analysis pass, so the codegen could just look up analysis results.

gkoz avatar May 17 '16 11:05 gkoz

@gkoz Agree

EPashkin avatar May 17 '16 17:05 EPashkin

After #267 classes and interfaces will get analyzed by the time codegen is run ensuring the trait methods get fixed up. So moving forward with this would be to make analysis::symbols aware of item types and teach it to emit relative paths for links.

gkoz avatar Aug 22 '16 14:08 gkoz