-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tweaking RequestUrl and UrlString, tweaking code styling
- Loading branch information
Showing
13 changed files
with
124 additions
and
60 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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 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,35 @@ | ||
# v0.13.5 release | ||
|
||
* 06.06.2021 | ||
|
||
### `fetch` module: `RequestUrl` | ||
|
||
* `hostname` renamed into `host` to reflect that it can contain the port | ||
* `path` renamed into `segments` to better reflect what it is | ||
* `uri` function renamed to `url` | ||
* `RequestUrl` now makes sure to not contain empty segments (thus it is no longer possible, | ||
accidentally or otherwise, to have a double `/` in the request URL) | ||
* new `RequestUrl.fromLocation(location: dom.raw.Location)` builder | ||
* Breaking: `addPath(path: String*)` renamed to `addSegments(path: String*)` | ||
* New: `withParams(params: Map[String, Seq[String]])` | ||
* New: `withSegments(segments: String*)` | ||
|
||
`*path` methods will split the argument by `/` into a `Seq[String]`, ensuring there are | ||
no empty segments. | ||
|
||
`url`, `RequestUrl.apply` and `RequestUrl.fromLocation` ensure there are no empty segments as well. | ||
|
||
|
||
### `util` module: new utilities in the | ||
|
||
* `UrlString` object | ||
* `parse` – parse a string into a `dom.raw.Location` | ||
```scala | ||
val myUrl = "https://laminext.dev/path?param=1" | ||
val location: dom.raw.Location = UrlString.parse(myUrl) | ||
console.print(location.origin) | ||
``` | ||
* `UrlUtils` object | ||
* `encodeSearchParams(params: Map[String, Seq[String]]): String` – encode the given parameters into a URL search string (`?param=1&...`) | ||
* `decodeSearchParams(search: String): Map[String, Seq[String]]` – decode a URL search string into a map of parameters | ||
|
This file contains 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 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 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 |
---|---|---|
@@ -1,22 +1,16 @@ | ||
.prose { | ||
& code:not(.hljs) { | ||
@apply text-gray-900; | ||
@apply font-medium; | ||
/*@apply text-sm;*/ | ||
@apply bg-gray-200; | ||
.prose code:not(.hljs) { | ||
@apply bg-blue-50 !important; | ||
@apply hover:bg-blue-200 !important; | ||
@apply text-blue-900 !important; | ||
@apply px-1 !important; | ||
@apply rounded !important; | ||
} | ||
|
||
&::before, &::after { | ||
content: " "; | ||
} | ||
} | ||
.prose code:not(.hljs):before { | ||
content: "" !important; | ||
} | ||
|
||
& h1, & h2, & h3, & h4, & h5 { | ||
& code:not(.hljs) { | ||
@apply bg-white; | ||
@apply text-blue-700; | ||
&::before, &::after { | ||
content: ""; | ||
} | ||
} | ||
} | ||
.prose code:not(.hljs):after { | ||
content: "" !important; | ||
} | ||
|
This file contains 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 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