Skip to content

Commit

Permalink
feat: docs
Browse files Browse the repository at this point in the history
  • Loading branch information
udayvunnam committed Mar 28, 2024
1 parent 4d4f83f commit 285577e
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 0 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 Uday Vunnam

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
63 changes: 63 additions & 0 deletions test-suite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Set of test cases to be automated by Cypress.io

## should dynamically generate breadcrumbs

- for static routes and dynamic path params
- static with multi path params

```javascript
// route - /path
// route - /path/:id
// route - /path/:id/subpath/:subpathid
<xng-breadcrumb>
```

## should pick labels from route config

Component level:

- label on parent component
- label on empty child component
- label on both parent and child for a same path(child should take preference)

Module level:

- label on Module
- label on empty child component
- label on both Module and child component for a same path(child should take preference)
- Lazy loaded module

## should be able to edit labels dynamically for a path

- should override the the label specified in route config
- should overide the label that is auto generated for an id
- should override breadcrumb with alias(simple path), alias(complex path)

## should be able to skip breadcrumb

- route config level
- dynamically with route path
- dynamically with route alias

## should be able to disable breadcrumb

- route config level
- dynamically with route path
- dynamically with route alias

## should be able to customize breadcrumb

- Add icon prefix, suffix
- Add a UPPERCASE Angular filter
- change language to Telugu

## should be able to customize breadcrumb styles

- font color, background
- Add a different separator
- change language to Telugu

## should handle query params and fragment on navigating back

- should persist query params and fragment
- same query param has different state in various breadcrumb steps. this should persist
12 changes: 12 additions & 0 deletions todo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# TODO list

Collapse breadcrumbs by default if they have 4+ items

Why 4+ items? this limit just “feels” right. 🙃

1. If the user wants to see the entire trail of breadcrumbs, they should have the option to do so. As you can see from the design below, adding clickable ellipses is a great way of implementing this.
2. Put the ellipses as close to the first item as possible — Items that are closer to the final item (current page) hold more weight to the user so you want to make those items visible.
3. Do not make the ellipses the actual first item — It is beneficial for users to know the origin of the current page they are on, especially if they are taken directly to the page they are on via a link.
4. Upon refreshing / re-navigating to the page, breadcrumbs should be collapsed again — There is no clean way to manually collapse breadcrumbs (nor do I think it is worth the effort) so make sure it is collapsed by default, even if they were expanded before.

https://blog.nrwl.io/nx-workspace-schematics-server-side-rendering-ssr-with-angular-universal-afc04ead55

0 comments on commit 285577e

Please sign in to comment.