-
Notifications
You must be signed in to change notification settings - Fork 11
feat: add timed docs to top nav #570
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
Open
MitanOmar
wants to merge
23
commits into
adfinis:main
Choose a base branch
from
MitanOmar:Add-Timed-Docs-To-Top-Nav
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
18c6207
feat: add timed docs to top nav
MitanOmar 39a17d1
Merge branch 'main' into Add-Timed-Docs-To-Top-Nav
MitanOmar fb6ad61
refactor(docs-service): use router name instate of uri
MitanOmar 1555471
fix(docs-service-test): lint issue
MitanOmar df2f480
Merge branch 'main' into Add-Timed-Docs-To-Top-Nav
MitanOmar fb87afa
fix(docs-service-test): linting issue
MitanOmar 47159f4
refactor(docs-service): move the base domain to env
MitanOmar d342948
fix(docs-service): lint
MitanOmar 9f3dbe7
fix(docs-service): nav icon
MitanOmar 593b203
test(docs-service): write acceptance test for docs service
MitanOmar b81e0ff
feat: add timed docs to the tour
MitanOmar 4c88f97
Merge branch 'main' into Add-Timed-Docs-To-Top-Nav
MitanOmar f82a919
refactor(docs-service): update docs variable name with URL fixing
MitanOmar 933b1cd
refactor: better text, and tests all routes
MitanOmar 378d6e4
refactor: the docs nav link icon to `circle-question`
MitanOmar 8cb8516
Merge branch 'main' into Add-Timed-Docs-To-Top-Nav
MitanOmar 90cd9d2
refactor: delete unuseful tests
MitanOmar f8685cb
refactor: use only docs icon instate of `docs` word
MitanOmar 8e63b56
Merge branch 'main' into Add-Timed-Docs-To-Top-Nav
MitanOmar d928843
refactor: implement the change requests
MitanOmar d430841
Merge branch 'main' into Add-Timed-Docs-To-Top-Nav
MitanOmar 8894c18
Merge branch 'main' into Add-Timed-Docs-To-Top-Nav
MitanOmar ac9a00e
Merge branch 'main' into Add-Timed-Docs-To-Top-Nav
MitanOmar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import Service, { service } from "@ember/service"; | ||
|
||
export default class DocsService extends Service { | ||
timedDocsURL = "https://timed.dev/docs/"; | ||
c0rydoras marked this conversation as resolved.
Show resolved
Hide resolved
|
||
@service router; | ||
|
||
docsUrlMatch = { | ||
// index.name: DocsUrl | ||
"index.attendances": "tracking/attendances", | ||
"index.reports": "tracking/timesheet", | ||
"analysis.index": "analysis", | ||
statistics: "statistics", | ||
projects: "projects", | ||
"users.index": "users", | ||
"users.edit.index": "users", | ||
"index.activities.index": "tracking/activities", | ||
}; | ||
MitanOmar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
get docsEndpoint() { | ||
c0rydoras marked this conversation as resolved.
Show resolved
Hide resolved
|
||
return this.timedDocsURL + this.getDocsURL; | ||
} | ||
|
||
get getDocsURL() { | ||
derrabauke marked this conversation as resolved.
Show resolved
Hide resolved
|
||
for (const timedRouterName of Object.keys(this.docsUrlMatch)) { | ||
if (this.router.currentRouteName === timedRouterName) { | ||
return this.docsUrlMatch[timedRouterName]; | ||
} | ||
} | ||
return ""; | ||
} | ||
} | ||
MitanOmar marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { module, test } from "qunit"; | ||
import { setupTest } from "timed/tests/helpers"; | ||
|
||
module("Unit | Service | docs", function (hooks) { | ||
setupTest(hooks); | ||
|
||
// TODO: Replace this with your real tests. | ||
test("it exists", function (assert) { | ||
const service = this.owner.lookup("service:docs"); | ||
assert.ok(service); | ||
}); | ||
}); | ||
derrabauke marked this conversation as resolved.
Show resolved
Hide resolved
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.