Skip to content

Commit

Permalink
feat: updates navigation, README, and launch config (#14)
Browse files Browse the repository at this point in the history
* Updates navigation, README, and launch config

* Fixes tests and CI setup

* Fixes SVG attributes
  • Loading branch information
cesarenaldi authored Jul 20, 2023
1 parent fa18ffc commit dce0a94
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 60 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Lint

on:
push:
branches: [main]
branches: [main, develop]
pull_request:
branches: [main]
branches: [main, develop]

jobs:
lint:
Expand Down
27 changes: 12 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ The primary purpose of this repository is to implement the [LIP-3](https://githu
- [Profile Lens Share Link](#profile-lens-share-link)
- [Lens Share UI](#lens-share-ui)
- [Lens Share App Manifest](#lens-share-app-manifest)
- [JSON Schema `$id`](#json-schema-id)
- [Contributing](#contributing)
- [Development workflow](#development-workflow)
- [Add your app manifest](#add-your-app-manifest)
Expand Down Expand Up @@ -79,19 +78,7 @@ The Lens Share UI is also responsible to render [Open Graph](https://ogp.me/) an

Lens Share App Manifest is a specification app metadata (e.g. name, description, routes, etc.) that is used by the Lens Share UI to show the list of apps the user can choose from when opening an Lens Share Link.

### JSON Schema `$id`

Every App Manifest MUST pass the App Manifest JSON Schema validation.

You can add the following JSON Schema `$id` to your App Manifest to have a better DX as well as inform any JSON schema validation tool to what schema your App Manifest is conforming to:

```json
{
"$id": "https://share.lens.xyz/schemas/1.0.0/app-manifest"
"name": "My Lens App",
"appId": "my-lens-app"
}
```
Every App Manifest MUST be validated with the JSON Schema: https://share.lens.xyz/schemas/1.0.0/app-manifest

## Contributing

Expand All @@ -109,7 +96,17 @@ After cloning the repo, run `pnpm install` to fetch its dependencies. Then you c

### Add your app manifest

[TBD]
- Fork this repository
- Install the dependencies with `pnpm install`
- Add your app manifest to the `manifests` folder
- Run the app locally with `pnpm dev`. The app is available at `http://localhost:3000/u/<your-handle>.lens`, or `http://localhost:3000/p/<your-publication-id>`
- Test thoroughly your configuration by:
- opening Lens Share links with web and mobile browser and verify your app shows in the list as expected
- opening Lens Share links with `?by=<your-app-id>` parameter to verify your app is prioritized as expected
- Amend the tests in the `e2e` folder to include your app name in the expected lists
- run the app on one terminal with `pnpm dev`
- verify tests pass on another terminal with `pnpm test`
- Commit your changes and open a PR against this repository

## License

Expand Down
16 changes: 2 additions & 14 deletions e2e/profiles.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,7 @@ test.describe("Given a Profile link", async () => {
test("Then it should show relevant app options", async ({ anyProfile }) => {
await anyProfile.open();

await expect(anyProfile.options).toHaveText([
"LensFrens",
"Lenster",
"Lenstube",
"Memester",
"Riff",
]);
await expect(anyProfile.options).toHaveText(["LensFrens", "Lenster", "Lenstube", "Riff"]);
});
});
});
Expand Down Expand Up @@ -81,13 +75,7 @@ test.describe("Given a Profile link with `by` attribution param", async () => {
test("Then it should show the specified app first", async ({ anyProfile }) => {
await anyProfile.openAsSharedBy("lenster");

await expect(anyProfile.options).toHaveText([
"Lenster",
"LensFrens",
"Lenstube",
"Memester",
"Riff",
]);
await expect(anyProfile.options).toHaveText(["Lenster", "LensFrens", "Lenstube", "Riff"]);
});
});

Expand Down
2 changes: 1 addition & 1 deletion e2e/publications.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ test.describe("Given a Publication link", async () => {
test("Then it should show relevant app options", async ({ imagePost }) => {
await imagePost.open();

await expect(imagePost.options).toHaveText(["Lenster", "Memester"]);
await expect(imagePost.options).toHaveText(["Collectz", "Lenster"]);
});
});
});
Expand Down
18 changes: 18 additions & 0 deletions manifests/collectz.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"appId": "collectz",
"name": "Collectz",
"description": "Your Collects Town Square",
"platform": "web",
"icon": {
"url": "https://bitcloutweb.azureedge.net/public/lens/images/Icon250.png",
"background": "#E5E5E5"
},
"routes": {
"home": "https://collectz.xyz/",
"publication": {
"url": "https://collectz.xyz/c/:id",
"supports": ["IMAGE"]
}
},
"twitter": "nftz_me"
}
20 changes: 0 additions & 20 deletions manifests/memester.json

This file was deleted.

4 changes: 2 additions & 2 deletions src/components/navigation/Logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ export function Logo({ className, responsive = false }: LogoProps) {
xmlns="http://www.w3.org/2000/svg"
>
<path
fill-rule="evenodd"
clip-rule="evenodd"
fillRule="evenodd"
clipRule="evenodd"
d="M31.6672 7.63493C33.5526 6.06904 35.6563 5.47325 37.6736 5.62386C39.8257 5.78453 41.8172 6.78863 43.3044 8.24712C44.7917 9.70571 45.8134 11.6566 45.977 13.7621C46.1421 15.8868 45.4274 18.1121 43.5432 20.0652C43.3708 20.2449 43.1947 20.4225 43.0149 20.5978C34.4687 28.9778 23.1162 28.9999 23.0001 29H22.9995C22.9415 29 11.5531 28.9995 2.98468 20.5966L2.9828 20.5948C2.80593 20.4203 2.63171 20.2446 2.46015 20.0679L2.45877 20.0664C0.573654 18.1151 -0.141681 15.8903 0.0228409 13.7656C0.18585 11.6605 1.20693 9.70933 2.69379 8.25023C4.18055 6.79123 6.17182 5.78632 8.32421 5.62498C10.3415 5.47376 12.4455 6.06881 14.332 7.63396C14.5349 5.21992 15.5917 3.3411 17.1258 2.04944C18.7619 0.671826 20.8941 0 22.9996 0C25.1051 0 27.2372 0.671826 28.8734 2.04944C30.4077 3.34127 31.4646 5.22043 31.6672 7.63493ZM23.3908 28.1503L23.3904 28.1397L23.3911 28.1396L23.3908 28.1503ZM22.6084 28.1503L22.6081 28.1396L22.6088 28.1397L22.6084 28.1503ZM29.4202 16.514C29.1864 16.514 29.1055 16.8451 29.2546 17.0205C29.5187 17.3312 29.6776 17.7309 29.6776 18.167C29.6776 19.1566 28.8596 19.9588 27.8505 19.9588C26.8414 19.9588 26.0234 19.1566 26.0234 18.167C26.0234 18.1141 25.953 18.0878 25.9211 18.1307C25.6329 18.5188 25.4384 18.9546 25.3585 19.4121C25.3135 19.6698 25.1 19.8831 24.8316 19.8831H24.6834C24.3332 19.8831 24.0443 19.6047 24.096 19.2674C24.4503 16.9555 26.7738 15.2787 29.4202 15.2787C32.0666 15.2787 34.3901 16.9555 34.7444 19.2674C34.7961 19.6047 34.5072 19.8831 34.157 19.8831C33.8068 19.8831 33.5294 19.6033 33.4533 19.2704C33.1069 17.755 31.5011 16.514 29.4202 16.514ZM13.1956 18.167C13.1956 18.0972 13.1033 18.0598 13.0599 18.1153C12.7518 18.5095 12.5419 18.9559 12.4531 19.4264C12.4006 19.7044 12.1701 19.9353 11.88 19.9353H11.7712C11.421 19.9353 11.1321 19.6569 11.1838 19.3195C11.5379 17.0064 13.8616 15.3309 16.508 15.3309C19.1544 15.3309 21.4781 17.0064 21.8322 19.3195C21.8839 19.6569 21.595 19.9353 21.2448 19.9353C20.8946 19.9353 20.6173 19.6555 20.5412 19.3226C20.195 17.8063 18.5893 16.5661 16.508 16.5661C16.3188 16.5661 16.2496 16.8266 16.3762 16.9635C16.6705 17.2815 16.8498 17.7038 16.8498 18.167C16.8498 19.1566 16.0318 19.9588 15.0227 19.9588C14.0136 19.9588 13.1956 19.1566 13.1956 18.167ZM25.0321 22.4881C25.2796 22.2468 25.6621 22.1295 25.9694 22.293C26.2768 22.4565 26.3934 22.8362 26.1719 23.1005C25.4506 23.961 24.2827 24.5063 22.9947 24.5063C21.7074 24.5063 20.5369 23.9667 19.8146 23.0997C19.594 22.8349 19.712 22.4555 20.0199 22.293C20.3278 22.1305 20.7097 22.2493 20.9569 22.4909C21.433 22.9564 22.1554 23.271 22.9947 23.271C23.8317 23.271 24.555 22.9532 25.0321 22.4881Z"
fill="currentColor"
/>
Expand Down
18 changes: 13 additions & 5 deletions src/components/navigation/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export function Navigation() {
return (
<nav className="bg-gradient-to-b from-[#3f4944] to-[#2a3530] p-[1px] rounded-full">
<h1 className="sr-only">Main navigation</h1>
<div className="bg-[#2a3530] rounded-full h-12 px-3 sm:h-14 sm:px-4 flex flex-row gap-4 sm:gap-8 items-center ">
<div className="bg-[#2a3530] rounded-full h-14 px-3 flex flex-row gap-4 sm:gap-8 items-center ">
<Logo className="text-lightForest" responsive />

<div className="sm:hidden">
Expand All @@ -28,9 +28,13 @@ export function Navigation() {

<div className="flex flex-col h-full justify-between items-stretch text-darkForest">
<div className="flex flex-col justify-start gap-6 items-start text-2xl">
<NavLink href="https://www.lens.xyz">Lens</NavLink>
<NavLink href="https://www.lens.xyz/community">Community</NavLink>

<NavLink href="https://www.lens.xyz/garden">Developers</NavLink>
<NavLink href="https://www.lens.xyz/creators">Creators</NavLink>

<NavLink href="https://www.lens.xyz/build">Devs</NavLink>

<NavLink href="https://www.lens.xyz/social-layer">Web3</NavLink>
</div>

<NavButton size="lg" variant="dark" href="https://claim.lens.xyz/">
Expand All @@ -41,9 +45,13 @@ export function Navigation() {
</div>

<div className="hidden sm:flex flex-row gap-8 justify-between items-center text-lightForest text-sm">
<NavLink href="https://www.lens.xyz">Lens</NavLink>
<NavLink href="https://www.lens.xyz/community">Community</NavLink>

<NavLink href="https://www.lens.xyz/creators">Creators</NavLink>

<NavLink href="https://www.lens.xyz/build">Devs</NavLink>

<NavLink href="https://www.lens.xyz/garden">Developers</NavLink>
<NavLink href="https://www.lens.xyz/social-layer">Web3</NavLink>

<NavButton size="md" variant="light" href="https://claim.lens.xyz/">
Claim handle
Expand Down
2 changes: 1 addition & 1 deletion src/data/AppManifestSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,4 @@ export const AppManifestSchema = z.object({

export type AppManifest = z.infer<typeof AppManifestSchema>;

export const AppManifestJsonSchema = zodToJsonSchema(AppManifestSchema);
export const AppManifestJsonSchema = zodToJsonSchema(AppManifestSchema, { target: "jsonSchema7" });

0 comments on commit dce0a94

Please sign in to comment.