-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #230 from ably/pricing-fixes
Pricing fixes
- Loading branch information
Showing
22 changed files
with
105 additions
and
110 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module AblyUi | ||
VERSION = '8.7.0.dev.68ea318' | ||
VERSION = '8.7.0.dev.80c4fae' | ||
end |
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 |
---|---|---|
@@ -1,11 +1,24 @@ | ||
--- | ||
- :name: href | ||
:optional: "Yes" | ||
:default: "/" | ||
:optional: "No" | ||
:type: String | ||
:description: Target URL | ||
- :name: logoUrl | ||
:optional: "No" | ||
:type: String | ||
:description: Link to logo image | ||
- :name: dataId | ||
:optional: "Yes" | ||
:default: "" | ||
:default: '""' | ||
:type: String | ||
:description: Identifier for DOM manipulation | ||
- :name: additionalImgAttrs | ||
:optional: "Yes" | ||
:default: "{}" | ||
:type: Object/Hash | ||
:description: Additional attributes for the image DOM element | ||
- :name: additionalLinkAttrs | ||
:optional: "Yes" | ||
:default: "{}" | ||
:type: Object/Hash | ||
:description: Additional attributes for the link DOM element |
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 |
---|---|---|
|
@@ -2,10 +2,10 @@ | |
# yarn lockfile v1 | ||
|
||
|
||
"@ably/[email protected].68ea318": | ||
version "8.7.0-dev.68ea318" | ||
resolved "https://registry.yarnpkg.com/@ably/ui/-/ui-8.7.0-dev.68ea318.tgz#40cc9f125154946a88c8b0f6904ebf9968f79f89" | ||
integrity sha512-n9ZonFIn0DBNRBDbHlc/JTXcrqSDqocrq+9xT8SQL6vSAxBpkXWgDKg9bTQ8zeV95g3dJltY+7oJOwnQ/CbQ3w== | ||
"@ably/[email protected].80c4fae": | ||
version "8.7.0-dev.80c4fae" | ||
resolved "https://registry.yarnpkg.com/@ably/ui/-/ui-8.7.0-dev.80c4fae.tgz#0ac810518e2761fce5fb3ed27a848f995ab5aa13" | ||
integrity sha512-D7dGGdJqauM3UYzdLhrjpk8c1p4FIKCUfGcIMf9DLbK0sDeAg3KhscWnKC6efkw6TkoowJRbKmGsXDMKcD9Gfg== | ||
dependencies: | ||
addsearch-js-client "^0.7.0" | ||
array-flat-polyfill "^1.0.1" | ||
|
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,28 +1,3 @@ | ||
<%= link_to logo_href, class: 'h-32' do %> | ||
<%= tag.svg class: ["transition-colors", "text-cool-black"], data: { id: data_id }, width: "108", height: "32", viewBox: "0 0 108 32", xmlns: "http://www.w3.org/2000/svg" do %> | ||
<path | ||
d="M62.922 24.9786V4.08813H66.6933V11.6512C67.9709 10.435 69.6164 9.76044 71.3538 9.76044C75.4318 9.76044 79.0498 12.8674 79.0498 17.5484C79.0498 22.2293 75.4318 25.3465 71.3538 25.3465C69.5244 25.3465 67.7971 24.6209 66.5094 23.3024V24.9786H62.922ZM75.2785 17.5484C75.2785 14.932 73.4183 13.1025 70.9859 13.1025C68.6148 13.1025 66.7853 14.84 66.6933 17.3644V17.5484C66.6933 20.1648 68.5534 21.9942 70.9859 21.9942C73.4183 21.9942 75.2785 20.1648 75.2785 17.5484ZM80.7975 24.9786V4.08813H84.5688V24.9786H80.7975ZM89.8425 30.3954L92.0399 25.1523L86.0712 10.1284H90.1491L93.9511 20.6247L97.8144 10.1284H101.954L93.8591 30.4056H89.8425V30.3954ZM56.9329 10.1284V12.0191C55.6247 10.5883 53.7952 9.77066 51.9147 9.77066C47.8367 9.77066 44.2187 12.8777 44.2187 17.5586C44.2187 22.2497 47.8367 25.3465 51.9147 25.3465C53.8668 25.3465 55.7166 24.4982 57.0555 22.9754V24.9888H60.3465V10.1284H56.9329ZM56.5649 17.5484C56.5649 20.1341 54.7048 21.9942 52.2724 21.9942C49.8399 21.9942 47.9798 20.1341 47.9798 17.5484C47.9798 14.9626 49.8399 13.1025 52.2724 13.1025C54.6435 13.1025 56.473 14.8706 56.5649 17.3644V17.5484Z" | ||
fill="currentColor" | ||
/> | ||
<path d="M19.2858 0L3.14788 29.5369L0 27.3293L14.932 0H19.2858ZM19.5107 0L35.6487 29.5369L38.7965 27.3293L23.8646 0H19.5107Z" fill="url(#<%= gradient_id_0 %>)" /> | ||
<path d="M35.4238 29.7107L19.3983 17.16L3.37271 29.7107L6.64323 32L19.3983 22.0147L32.1533 32L35.4238 29.7107Z" fill="url(#<%= gradient_id_1 %>)" /> | ||
<defs> | ||
<linearGradient id="<%= gradient_id_0 %>" x1="5.47361" y1="37.4219" x2="32.4603" y2="7.45023" gradientUnits="userSpaceOnUse"> | ||
<stop stop-color="#FF5416" /> | ||
<stop offset="0.2535" stop-color="#FF5115" /> | ||
<stop offset="0.461" stop-color="#FF4712" /> | ||
<stop offset="0.6523" stop-color="#FF350E" /> | ||
<stop offset="0.8327" stop-color="#FF1E08" /> | ||
<stop offset="1" stop-color="#FF0000" /> | ||
</linearGradient> | ||
<linearGradient id="<%= gradient_id_1 %>" x1="10.7084" y1="39.3593" x2="26.6583" y2="21.6452" gradientUnits="userSpaceOnUse"> | ||
<stop stop-color="#FF5416" /> | ||
<stop offset="0.2535" stop-color="#FF5115" /> | ||
<stop offset="0.461" stop-color="#FF4712" /> | ||
<stop offset="0.6523" stop-color="#FF350E" /> | ||
<stop offset="0.8327" stop-color="#FF1E08" /> | ||
<stop offset="1" stop-color="#FF0000" /> | ||
</linearGradient> | ||
</defs> | ||
<% end %> | ||
<%= link_to logo_href, class: 'block', style: "height: 2.125rem", data: { id: data_id }, **additional_link_attrs do %> | ||
<%= tag.img src: logo_url, width: "108px", alt: "Ably logo", **additional_img_attrs %> | ||
<% end %> |
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,53 +1,20 @@ | ||
import React, { useMemo } from "react"; | ||
import React from "react"; | ||
import T from "prop-types"; | ||
import { nanoid } from "nanoid/non-secure"; | ||
|
||
const Logo = ({ dataId, href = "/" }) => { | ||
// This fixes a bug where if the logo is rendered more than once on the page, and one of the instances | ||
// if it is hidden, the other instance will not show the ably shape from the logo. | ||
|
||
// This is because the defs in this SVG reference ids that need to be unique ids. The browser discards the "newer" | ||
// linearGradients defined in the other logo, and inherits the `hidden` style from the first. | ||
const gradientIds = useMemo(() => [nanoid(), nanoid()], []); | ||
|
||
const Logo = ({ dataId, logoUrl, href = "/", additionalImgAttrs, additionalLinkAttrs }) => { | ||
return ( | ||
<a href={href} className="h-32"> | ||
<svg data-id={dataId} className="text-cool-black transition-colors" width="108" height="32" viewBox="0 0 108 32" xmlns="http://www.w3.org/2000/svg"> | ||
<path | ||
d="M62.922 24.9786V4.08813H66.6933V11.6512C67.9709 10.435 69.6164 9.76044 71.3538 9.76044C75.4318 9.76044 79.0498 12.8674 79.0498 17.5484C79.0498 22.2293 75.4318 25.3465 71.3538 25.3465C69.5244 25.3465 67.7971 24.6209 66.5094 23.3024V24.9786H62.922ZM75.2785 17.5484C75.2785 14.932 73.4183 13.1025 70.9859 13.1025C68.6148 13.1025 66.7853 14.84 66.6933 17.3644V17.5484C66.6933 20.1648 68.5534 21.9942 70.9859 21.9942C73.4183 21.9942 75.2785 20.1648 75.2785 17.5484ZM80.7975 24.9786V4.08813H84.5688V24.9786H80.7975ZM89.8425 30.3954L92.0399 25.1523L86.0712 10.1284H90.1491L93.9511 20.6247L97.8144 10.1284H101.954L93.8591 30.4056H89.8425V30.3954ZM56.9329 10.1284V12.0191C55.6247 10.5883 53.7952 9.77066 51.9147 9.77066C47.8367 9.77066 44.2187 12.8777 44.2187 17.5586C44.2187 22.2497 47.8367 25.3465 51.9147 25.3465C53.8668 25.3465 55.7166 24.4982 57.0555 22.9754V24.9888H60.3465V10.1284H56.9329ZM56.5649 17.5484C56.5649 20.1341 54.7048 21.9942 52.2724 21.9942C49.8399 21.9942 47.9798 20.1341 47.9798 17.5484C47.9798 14.9626 49.8399 13.1025 52.2724 13.1025C54.6435 13.1025 56.473 14.8706 56.5649 17.3644V17.5484Z" | ||
fill="currentColor" | ||
/> | ||
<path | ||
d="M19.2858 0L3.14788 29.5369L0 27.3293L14.932 0H19.2858ZM19.5107 0L35.6487 29.5369L38.7965 27.3293L23.8646 0H19.5107Z" | ||
fill={`url(#${gradientIds[0]})`} | ||
/> | ||
<path d="M35.4238 29.7107L19.3983 17.16L3.37271 29.7107L6.64323 32L19.3983 22.0147L32.1533 32L35.4238 29.7107Z" fill={`url(#${gradientIds[1]})`} /> | ||
<defs> | ||
<linearGradient id={gradientIds[0]} x1="5.47361" y1="37.4219" x2="32.4603" y2="7.45023" gradientUnits="userSpaceOnUse"> | ||
<stop stopColor="#FF5416" /> | ||
<stop offset="0.2535" stopColor="#FF5115" /> | ||
<stop offset="0.461" stopColor="#FF4712" /> | ||
<stop offset="0.6523" stopColor="#FF350E" /> | ||
<stop offset="0.8327" stopColor="#FF1E08" /> | ||
<stop offset="1" stopColor="#FF0000" /> | ||
</linearGradient> | ||
<linearGradient id={gradientIds[1]} x1="10.7084" y1="39.3593" x2="26.6583" y2="21.6452" gradientUnits="userSpaceOnUse"> | ||
<stop stopColor="#FF5416" /> | ||
<stop offset="0.2535" stopColor="#FF5115" /> | ||
<stop offset="0.461" stopColor="#FF4712" /> | ||
<stop offset="0.6523" stopColor="#FF350E" /> | ||
<stop offset="0.8327" stopColor="#FF1E08" /> | ||
<stop offset="1" stopColor="#FF0000" /> | ||
</linearGradient> | ||
</defs> | ||
</svg> | ||
<a href={href} data-id={dataId} className="block" style={{ height: "2.125rem" }} {...additionalLinkAttrs}> | ||
<img src={logoUrl} width="108px" alt="Ably logo" {...additionalImgAttrs} /> | ||
</a> | ||
); | ||
}; | ||
|
||
Logo.propTypes = { | ||
dataId: T.string, | ||
href: T.string, | ||
logoUrl: T.string, | ||
additionalImgAttrs: T.object, | ||
additionalLinkAttrs: T.object, | ||
}; | ||
|
||
export default React.memo(Logo); |
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
Oops, something went wrong.