owncloud / docs-webui

ownCloud Server Documentation
https://doc.owncloud.com
GNU Affero General Public License v3.0
5 stars 4 forks source link

Take care on doc pages permalink #124

Closed dragotin closed 1 year ago

dragotin commented 1 year ago

As discussed:

We need to find a method how to reference html doc content in products in such a way where the link used in the product does not need any change when the html target link changes.

@mmattel please propose a schema that can be implemented in web and create the issue there once done. Thanks!

mmattel commented 1 year ago

First of all we need to clarify how redirecting with Antora works for a common understanding and finding the right solution.

Antora is not a webserver but a static site builder. You can only redirect to pages:

  1. The existing page is part of the content catalog (explanation see later)
  2. The existing page got moved from one location to another
  3. You want to have access to that moved page but via the former location
  4. A direct call to the relocated page including an anchor (my-page.html#section) works
  5. When issuing a call to the redirection page containing an anchor to a section, the anchor gets cut off by design of the HTML redirection page. This means you get redirected to the page on the new location but not the section (anchor) in that page.

How this works: You add a redirect rule in the moved page telling where it was (page-aliases). When building, this creates an invisible html page per alias on the former location which redirects to the new location. You can set more than one alias for one page. The sitemap file(s) are populated correctly based on the content catalog but do not contain the redirection page(s).

This is (shortened a lot) the main part how the redirection is created, standard HTML, no influence: <meta http-equiv="refresh" content="time; URL=new_url" />

You can use this mechanism for moved but not for deleted pages as a target is missing. Except when pointing to a "best fit" existing page.

Lets call that reverse redirect because the page already existed.

Solution scenarios:

What we need here is the opposite. We need a forward redirection. We do not care if the page existed or not, we either need to rewrite the URL right from the beginning or use a target HTML page that redirects to the final location.

There are only two choices doing this. Antora or the webserver.

There are pros and cons for both methods but as far I can tell, keeping the anchor is essential until stated differently.

Please advise.

@dragotin @JanAckermann @xoxys

AlexAndBear commented 1 year ago

I don't want to interfere here too much but:

If it is ok that we can redirect to a page but not to the section in the page because the anchor is dropped, we can do this with the docs team / Antora alone.

I don't see this as a good solution, we really want to take the user by the hand and help them to find the corresponding doc record

I can't say anything about the technical solution, but a regular web server like nginx or apache should be able to rewrite the urls, but its not super handy for the doc team, because it might require the help of an admin each time adding a new alias

michaelstingl commented 1 year ago

I'd vote for the page-aliases. I'm aware that anchors don't work, but permalinked content is too important to be hidden behind an anchor. It should always an individual page. Big benefit of page-aliases I see, it's transparent for all contributors. I could take care of changes in desktop and mobile apps to support page-aliases links. Just let me know…

dragotin commented 1 year ago

Ok, please implement this using page-aliases as described, unless @kulmann vetos.

kulmann commented 1 year ago

Ok, please implement this using page-aliases as described, unless @kulmann vetos.

fine by me, please go ahead

mmattel commented 1 year ago

@kulmann @JanAckermann

We currently have, relevant for ocis/owncloud-web:

  1. These main links can immediately be referenced by the webui team.
  2. If there is any structural change, which I doubt it will take place in the next year(s), I will create a internal link that references to the new target. Means no change for the webui team.
  3. Note that though you can atm reference to a section, I please you NOT to do so as this is more likely a subject of change.
  4. I will add a comment in the two pages to remind that these documents are linked by the webui and need to be resolvable under the above html links.
AlexAndBear commented 1 year ago

What are the plans for the future ? Currently we just link to the sharing section. Replacing that link to the general docs for web users w/o section, feels like a step backwards instead of forward

kulmann commented 1 year ago

Fully agree with @JanAckermann , only being able to link to the main pages for Users or Admins is a step backwards. That's also not at all what I understood from all the posts above. Could you please explain your plans here @mmattel

mmattel commented 1 year ago

Could you please explain your plans

As described above, there are only two ways:

Pros and cons for both version, I follow the decision that is/will be made.

kulmann commented 1 year ago

I read what you described above. And there was a decision for Page only redirect via Antora managed by docs team. But after that decision was made you told us to only link to the root page of the User and Admin docs. Which is not a good solution. I don't understand why we shouldn't link to the specific sub pages.

mmattel commented 1 year ago

why we shouldn't link to the specific sub pages.

Lets split this into three cases

Add on note:

kulmann commented 1 year ago

Easy consequence: If we can't link to specific pages of the documentation then I will remove all links to the documentation from the web ui contextual helpers.

mmattel commented 1 year ago

You always can point to https://doc.owncloud.com/webui/next/

xoxys commented 1 year ago

I'm confused... What's the problem while linking to sub-pages? This should work without any issue, the only restriction is that linking to anchors will not work. If linking to anchors is a hard requirement, make the proper decision that a setup that supports anchors is needed, and we need to plan a setup.

kulmann commented 1 year ago

I'm confused... What's the problem while linking to sub-pages? This should work without any issue, the only restriction is that linking to anchors will not work. If linking to anchors is a hard requirement, make the proper decision that a setup that supports anchors is needed, and we need to plan a setup.

Yeah me as well!

mmattel commented 1 year ago

I would really like to have the stakeholders in a call so they can express their need, we can explain the possibilities with their pros and cons and find a decision that all stakeholders can and will live with.

AlexAndBear commented 1 year ago

@xoxys we don't care much about how the link looks like, anchor or not. We just need a link which is directing us to the sharing section for example (that's the onliest link to docs in web for now).

Is this possible or not, ticket is open for 21d now and I don't see things proceeding. Just back and forth communication.

kulmann commented 1 year ago

I would really like to have the stakeholders in a call so they can express their need, we can explain the possibilities with their pros and cons and find a decision that all stakeholders can and will live with.

Again, the decision is already there. Use alias links page aliases so that you can provide stable links to documentation pages. But right after the decision was made you told everyone in this ticket that a) page aliases to any page of the documentation are possible but b) you don't want to make use of them and everyone should only link to the root page of the docs.

Edit: On top of that, the requirement from the CTO of the company is clearly written down in the initial issue description and was confirmed by product owners. I don't see a need for a meeting.

xoxys commented 1 year ago

I dont get your points... You dont care about the details and arguments like "decision was made already" if this decision does not fit your needs is somehow strange...

Technical details matters because they are relevant in case of the chosen solution.. However if you want our team to set up something let us know otherwise im out for now.

AlexAndBear commented 1 year ago

@xoxys yes, please set up something that matches our needs, like I described above.

xoxys commented 1 year ago

Ok will create an internal ticket. As we are working ok other priority tasks this will take some time.

AlexAndBear commented 1 year ago

Thanks for taking care 🙏🙏🙏

xoxys commented 1 year ago

I need a list of all links you want to use in web. We will then provide you a permalink for each of them to use. Remember, using this method requires that you will notify us every time you want to use a new URL in web, so we can prepare a new permalink first.

AlexAndBear commented 1 year ago

sure that's the list:

(Yep, just 1)

mmattel commented 1 year ago

@xoxys mind to share how you think that could be implemented on the webserver side? I guess to know such a mechanism could be beneficial for other codebases too... just my 2c.

xoxys commented 1 year ago

Sure it will be just the same we use for core.

mmattel commented 1 year ago

May I do a proposal with regards to the naming of the used link: I core we have as example: href="https://doc.owncloud.com/server/go.php?to=admin-performance"

To make this more futureproof, I suggest:

Examples: href="https://doc.owncloud.com/go.php?to=webui-sharing" href="https://doc.owncloud.com/go.php?to=desktop-vfs" href="https://doc.owncloud.com/go.php?to=anfroid-spaces" href="https://doc.owncloud.com/go.php?to=ios-spaces"

Having that, we can easily identify where this belongs to and would be open to any future changes.

xoxys commented 1 year ago

I dont have any personal preference, if that helps you we can name it that way, but I'll cut off the useless pseudo-php extension this time. Means links will be https://doc.owncloud.com/go?to=webui-sharing

dragotin commented 1 year ago

A new aspect (for me at least) is that we have to allow anchors in the links, because currently the docs are structured in the way that there are only a few separate pages, structured with anchors. If we are not allowing anchors, the whole feature is pointless, because we can not link to specific topics.

I suggest the following:

I realize that this is a compromise, but well...

mmattel commented 1 year ago

Plan to versionize the Infinite Scale documentation (user and admin):

General info, the current way of versioning the ocsi admin docs is made via text notes and tabs containing content relevant for a version.

OCIS (admin docs)

ownCloud Web (user docs)

Effort

Pls let me know when I should start.

gedw99 commented 1 year ago

What about using a CID ? Content Identifier.

Same as what IPFS uses for this exact problem of Providence of where content came from and hence where it is over time. The old Time / space problem :)


How to do the same concept in OCIS ?

OCIS NATS server can notify a Consumer of when a document changes and its URI could / should be one of the things it notifies of. Its part of security audit trailing anyway. hence why i referred to Providence.

SO then any Actor can then track a documents URI over time by consuming off NATS Notifications.

https://owncloud.dev/services/notifications/ looks like its already used for tracking things that are related to this area.

https://owncloud.dev/services/storage-publiclink/ seems that it might be something related. no doc yet though so hard to know.

tbsbdr commented 1 year ago

docmeeting: @micbar please decide how to proceed

mmattel commented 1 year ago

@micbar as discussed in the Doc Board Meeting and as requested, I would like to propose an alternative approach which imho leads to the desired result in permalinks on a global docs scope with minimal efforts. Not only for the webui but for all doc modules and also for any produc that uses/will use links#anchors to docs. Note that whomever I asked about how they would approach this, the same answer was given.

Also Note that we have a well working example for this proposal - core.

Please take this into your considerations.

micbar commented 1 year ago

@xoxys I need an effort estimation. Sorry that this ticket has exploded so much.

If i understand the proposal correctly,

1) Webserver setup is a one time effort 2) The redirect list will be maintained by the docs team

xoxys commented 1 year ago

@micbar please decide how to proceed

I don't know what decision was made, so I can't estimate.

In a nutshell, use the webserver as mediator as only he accesses all the content correctly and can do redirects in a proper way including anchors. To achieve this and to relax sysadmin efforts, there is a one time taks on the sysadmin side to implement a docs wide valid go.php (or however we name it) mediator that loads a docs maintained translation list from a source string to a target link.

This will never happen for security reasons. We will not allow sideloading any web server configuration.

micbar commented 1 year ago

This issue is a total mess 😅

There was a decision made by @dragotin But @mmattel says it is not actionable.

I am just trying to reduce that mess and understand the consequences.

If i understand you correctly, loading a list of redirects from a not sysadmin managed system is a total No-Go.

Under the assumption that my assumption is correct, i assume now @mmattel that your proposal is not working.

This brings me to the assumption that the original idea (use page aliases) may be the right way to go. Ironically this was already decided 🤣

So what should I do now? I am tempted to open up an arena to make new proposals, buy some 🍿 and watch.

Please do not take this personally, I am trying to find a solution ❤️

xoxys commented 1 year ago

I don't know why 73 new proposals were made again. We need a persistent way to link to some parts of the docs, and these permalinks need to support anchors. End of the story.

To get this working, we will prepare permalinks on the web server. Whenever the docs team decides to change the target of this permalink in a way that can't be fixed by page aliases, they need to create an Issue or PR in the internal deployment repo to get it fixed (or avoid refactoring the basic structure frequently). But honestly, if you need to change this redirect config every week, then this approach is the wrong way. Personally, I also don't see why the page structure need to be changed that often.

As there is currently only a single link (at least only this one was reported) the estimated time to set it up is 15 minutes but till low priority on my list. If we are now finally done discussing this over and over again, I can implement it by the end of the week. But it looks like you and me were not invited to the docs meeting, so I have no idea what's the real problem is... If you need some time to find out, just ping me again later.

AlexAndBear commented 1 year ago

As there is currently only a single link (at least only this one was reported)

Just here to confirm, this is still the case...

mmattel commented 1 year ago

if you need to change this redirect config every week, then this approach is the wrong way. Personally, I also don't see why the page structure need to be changed that often.

I am not expecting this occuring more than once a year, usually in longer intervals. From experience on ownCloud server we know that this is extremely static. The last time I can remember this was ~20m ago.

xoxys commented 1 year ago

sure that's the list:

* https://doc.owncloud.com/webui/next/owncloud_web/web_for_users.html#sharing

Done: https://doc.owncloud.com/go?to=webui-users-sharing

AlexAndBear commented 1 year ago

Done here as well: https://github.com/owncloud/web/pull/9567

that was a wild ride, closing