ex_doc icon indicating copy to clipboard operation
ex_doc copied to clipboard

Add reference_apps

Open josevalim opened this issue 2 years ago • 2 comments

The idea is to allow a list of apps to be given. Then we will support autocompleting the modules and functions of additional apps in the autocompletion bar. They can also be searched but only on their name (not their documentation otherwise it may get too expensive).

Once clicked, we will navigate to the page of the module/function in another completely different URL (as we do for regular links). This can be used by ecto and ecto_sql to include each other entries. Or by Elixir to include entries for Logger, Mix, etc.

josevalim avatar Apr 12 '22 15:04 josevalim

Should we consider to handle them then as target="_blank"? To make it clear you'll leave the docs of the current app.

Or probably also style it with CSS as some kind of external.

cw789 avatar Apr 12 '22 15:04 cw789

Yes and yes!

josevalim avatar Apr 12 '22 15:04 josevalim

Is there an idea of how this would end up being supported? Would the search for these get build when the docs are built? If so where would it get the search results? Asking because I'd be interested in contributing this if I can get some pointers on how we'd like it implemented.

zachdaniel avatar Dec 14 '22 18:12 zachdaniel

There are two steps I think:

  1. Make them show up in autocomplete and clicking on it takes you to a separate project on hexdocs.pm

  2. Directly embed their content so they can also be searched for

I would start with step 1. I also think we should stop limiting autocomplete to 5 elements. We should make that list scrollable for sure.

josevalim avatar Dec 14 '22 18:12 josevalim

I opened up an issue #1637 that may also be a place to start, which I think can be implemented quite easily. Essentially allowing for links of type :custom or :external and having them built based on configuration in the mix config. Then reference_apps could just add to that list.

zachdaniel avatar Dec 14 '22 18:12 zachdaniel

Closing in favor of the PR, as we are discussing the viability of moving this forward. :)

josevalim avatar May 23 '23 19:05 josevalim