Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: wiki - page toc and directory support #7225

Closed
wants to merge 48 commits into from

Conversation

Cherrg
Copy link
Contributor

@Cherrg Cherrg commented Jun 17, 2019

This PR

  • add a "List of pages" to internal wiki (page tree). They will be generated with JS like TOC for Wiki Pages #822, so it will be fast and don't burden the server. This feature could be disabled per configuration flag, or inside repository settings.
  • add support for directories inside wiki. Create/update/delete pages works well. If an old page is updated, the file will be moved to subdirectory.
  • allows to read files with nearly all letters, as it is possible to push all via wiki gitrepo.
    • Now it's possible to always access misspelled wikipages, which may be pushed via git. The fallback for old plain file structure is only kept (and used) to support old links inside existing wikipages.
      So there is no priority on rendering old or new file, as it is decided by link.
    • duplicate pages (old structure and new page inside directory, may pushed via git) will be marked red on Page-TOC mentioned above.
      • If there are an file in old and new structure, writing will delete both old files, while delete deletes sequential. First delete call will only delete file in old plain structure.
  • add button 'Abort' to wiki edit and new page
  • fixes issure mentioned in js/index.js line 1139
  • fix 500 error if wiki contains pages with invalid uri encoding (e.g. filename: badescaping%%)

Unlike my last comment on #823 images relative to directory are OK now.

Requires: #7182
As this PR uses some script and css i've added there, it is nessesary to pull that first.
Changes made by this PR could be seen here Compare this PR with #7182
If you read commit messages/names, it should be clear what and why i've done something.

fix #823

Some Images

(Note the list symbol on Small and Mobile in top left corner)

Large Mobile
image image
Small Mobile Open
image image
Light
image image
image

Question

  • Is modules\markup\html shortLinkProcessorFull still working with this? Where is it used? Does anyone know?

Signed-off-by: Michael Gnehr michael@gnehr.de

Cherrg and others added 29 commits June 11, 2019 12:04
see go-gitea#822

Signed-off-by: Michael Gnehr <michael@gnehr.de>
Signed-off-by: Michael Gnehr <michael@gnehr.de>
Signed-off-by: Michael Gnehr <michael@gnehr.de>
Signed-off-by: Michael Gnehr <michael@gnehr.de>
Signed-off-by: Michael Gnehr <michael@gnehr.de>
Signed-off-by: Michael Gnehr <michael@gnehr.de>
+ reduce js call stack: function -> inline function

Signed-off-by: Michael Gnehr <michael@gnehr.de>
Signed-off-by: Michael Gnehr <michael@gnehr.de>
Signed-off-by: Michael Gnehr <michael@gnehr.de>
>1760px

Signed-off-by: Michael Gnehr <michael@gnehr.de>
+ ui + language

Signed-off-by: Michael Gnehr <michael@gnehr.de>
Signed-off-by: Michael Gnehr <michael@gnehr.de>
Signed-off-by: Michael Gnehr <michael@gnehr.de>
+ add reseverd keyword for delete route

Signed-off-by: Michael Gnehr <michael@gnehr.de>
Signed-off-by: Michael Gnehr <michael@gnehr.de>
Signed-off-by: Michael Gnehr <michael@gnehr.de>
this will create a new page on same parent directory as currently shown page

Signed-off-by: Michael Gnehr <michael@gnehr.de>
wiki render request was triggered when return back to edit mode

Signed-off-by: Michael Gnehr <michael@gnehr.de>
Signed-off-by: Michael Gnehr <michael@gnehr.de>
+ add ui elements, script and css
+ automatic resize (js) content cotainer, if toc size is larger than rendered markup

Signed-off-by: Michael Gnehr <michael@gnehr.de>
Signed-off-by: Michael Gnehr <michael@gnehr.de>
@Cherrg Cherrg changed the title wiki - page toc and directory support WIP: wiki - page toc and directory support Jun 17, 2019
@lunny
Copy link
Member

lunny commented Jul 23, 2019

Please resolve conflicts.

@lunny
Copy link
Member

lunny commented Sep 6, 2019

Is this still WIP?

@lunny lunny modified the milestones: 1.10.0, 1.11.0 Sep 15, 2019
@stale
Copy link

stale bot commented Nov 14, 2019

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 months. Thank you for your contributions.

@stale stale bot added the issue/stale label Nov 14, 2019
@gsantner
Copy link

gsantner commented Nov 14, 2019

expected to land?

actually TOC is really important for wiki 😅

@stale stale bot removed the issue/stale label Nov 14, 2019
@techknowlogick
Copy link
Member

@gsantner conflicts need to be resolved before this can be merged.

@Cherrg
Copy link
Contributor Author

Cherrg commented Nov 16, 2019

@gsantner
This PR was too bulky and huge, so directory support was extracted from this PR (#7390 + #8891).
I will refactor this when #7182 + directory support are done

@techknowlogick techknowlogick modified the milestones: 1.11.0, 1.x.x Dec 12, 2019
@stale
Copy link

stale bot commented Feb 10, 2020

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 months. Thank you for your contributions.

@stale stale bot added the issue/stale label Feb 10, 2020
@lunny lunny added the issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented label Feb 13, 2020
@stale stale bot removed the issue/stale label Feb 13, 2020
@a96219
Copy link

a96219 commented Jan 6, 2021

Will this feature eventually be released?

@Tanami
Copy link

Tanami commented Jan 7, 2021

would really love to see this feature live

@psykro
Copy link

psykro commented May 24, 2022

Hello,

Do you know when this feature is planned ?

Currently having all wiki pages on the same folder make it unusable for large projects.

@ehrenfeu
Copy link

Gitea 1.17 has support for TOCs (see #19873), so this PR here is probably partially obsolete.

However, I would REALLY love to see the folders feature! ❤️

@lunny lunny removed this from the 1.x.x milestone Mar 20, 2023
@wxiaoguang
Copy link
Contributor

It has been stale for a long time and I can't think of a way to handling it other than closing it. Feel free to reopen if there's any new progress and I could also help.

@wxiaoguang wxiaoguang closed this May 1, 2023
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Aug 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. type/feature Completely new functionality. Can only be merged if feature freeze is not active.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hierarchy (sub directory) in Wiki