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
Add local directory listing feature #32166
Comments
To fix the unit test for the directory listing page, the directories and files have been grouped separately and sorted alphabetically. So the latest version of the code found in the pull request will generate a directory listing which looks like the attached image. Note, however, that there is still a technical problem when the address bar URL does not end with a forward-slash. See the comment in the pull request for information about this. (Update: I think the third commit added to the pull request has fixed this problem.) |
The actual file last-modified datetimes are now being written into the page; file sizes are now shown in bytes, kibybytes, mebibytes, and so on depending on how large the file is; the HTML markup has been given more structure; and I opted for a bold stylesheet inspired by the colours of the Servo logo and website. The latest version of the code in the pull request will render a directory listing like this: Directories and files have different colours (and symlinks different again, though none are shown in this screenshot). The "Modified" date will not show the year if the file was last modified in the current year, or will simply show "today" if the file was last modified today, and all of this is handled by CSS, so it can be customised easily. I'm not convinced the styling won't be completely rejected, but this is the look which has grown on me during development. |
Describe the new feature:
A clear and concise description of the new feature with links to any relevant specifications.
Add a directory listing feature to Servo, so that when visiting a local directory path instead of a specific file, Servo will generate a table of contents which lists the files and sub-directories within the specified local directory.
As an example, in Mozilla Firefox visit a path such as
file:///home/your_username/
and see how it lists the content of your home directory.This feature will make it easier to move between Servo test directories and test files, and will make it useful for web developers to easily browse the content of their local development directories while creating and testing content.
The text was updated successfully, but these errors were encountered: