Skip to content

Commit

Permalink
Merge branch 'main' into 2.0-branch
Browse files Browse the repository at this point in the history
  • Loading branch information
bswatson authored Jan 12, 2023
2 parents 56a4165 + 5867f83 commit 56c8bfa
Show file tree
Hide file tree
Showing 9 changed files with 101 additions and 15 deletions.
6 changes: 6 additions & 0 deletions .changeset/fresh-cats-sell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@moderntribe/sitebuilder": patch
"@moderntribe/wme-sitebuilder": patch
---

Add purchase domain icon to setup screen card
6 changes: 0 additions & 6 deletions .changeset/purple-buckets-sell.md

This file was deleted.

63 changes: 63 additions & 0 deletions .github/workflows/split.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: 'Split Composer Packages'

on:
push:
branches:
- main
- 1.0-branch
- 2.0-branch
tags:
- '*'

env:
GITHUB_TOKEN: ${{ secrets.SPLIT_ACCESS_TOKEN }}

jobs:
packages_split:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
# define package to repository map
package:
-
local_path: 'plugins/wme-sitebuilder'
split_repository: 'wme-sitebuilder'

steps:
- uses: actions/checkout@v3

# no tag
-
if: "!startsWith(github.ref, 'refs/tags/')"
uses: "symplify/[email protected]"
with:
# ↓ split "plugins/wme-sitebuilder" directory
package_directory: '${{ matrix.package.local_path }}'

# ↓ into https://github.com/moderntribe/wme-sitebuilder repository
repository_organization: 'moderntribe'
repository_name: '${{ matrix.package.split_repository }}'

# ↓ the user signed under the split commit
user_name: "bswatson"
user_email: "[email protected]"

# with tag
-
if: "startsWith(github.ref, 'refs/tags/')"
uses: "symplify/[email protected]"
with:
tag: ${GITHUB_REF#refs/tags/}

# ↓ split "plugins/wme-sitebuilder" directory
package_directory: '${{ matrix.package.local_path }}'

# ↓ into https://github.com/moderntribe/wme-sitebuilder repository
repository_organization: 'moderntribe'
repository_name: '${{ matrix.package.split_repository }}'

# ↓ the user signed under the split commit
user_name: "bswatson"
user_email: "[email protected]"
7 changes: 7 additions & 0 deletions packages/sitebuilder/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@
- @moderntribe/wme-ui@3.0.0
- @moderntribe/wme-utils@2.0.0

## 1.7.1

### Patch Changes

- 9ccf6b6: Adds fix to handle null domain search package property
- 18a78d5: Type fix for Loadable component and removes outdated local dev code.

## 1.7.0

### Minor Changes
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 9 additions & 6 deletions packages/sitebuilder/src/utils/parseDomainListItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ type DomainListItem = {
selected: boolean,
}

function getPrice(termFees: DomainTermFees, isAvailable: boolean) {
if (! isAvailable) {
function getPrice(termFees: DomainTermFees | undefined, isAvailable: boolean) {
if (! termFees || ! isAvailable) {
return undefined;
}

Expand All @@ -31,8 +31,11 @@ function getPrice(termFees: DomainTermFees, isAvailable: boolean) {
);
}

function getChipLabel(isAvailable: boolean, isSelected: boolean) {
if (! isAvailable) {
function getChipLabel(domain: Domain, isSelected: boolean) {
if (! domain.package) {
return GoLiveStringData.domainItems.unavailable;
}
if (! domain.is_available) {
return GoLiveStringData.domainItems.taken;
}
if (isSelected) {
Expand All @@ -52,8 +55,8 @@ export function parseDomainListItem(domain: Domain, selected: boolean): DomainLi
return ({
name: domain.domain,
disabled: ! domain.is_available,
price: getPrice(domain.package.term_fees, domain.is_available),
chipLabel: getChipLabel(domain.is_available, selected),
price: getPrice(domain.package?.term_fees, domain.is_available),
chipLabel: getChipLabel(domain, selected),
chipColor: getChipColor(domain.is_available, selected),
selected,
});
Expand Down
1 change: 1 addition & 0 deletions packages/sitebuilder/src/wizards/go-live/data/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,6 @@ export const GoLiveStringData = {
taken: __('Taken', 'moderntribe-sitebuilder'),
selected: __('Selected', 'moderntribe-sitebuilder'),
available: __('Available', 'moderntribe-sitebuilder'),
unavailable: __('Unavailable', 'moderntribe-sitebuilder'),
}
};
6 changes: 6 additions & 0 deletions packages/storebuilder/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
- @moderntribe/wme-ui@3.0.0
- @moderntribe/wme-utils@2.0.0

## 1.5.2

### Patch Changes

- 18a78d5: Type fix for Loadable component and removes outdated local dev code.

## 1.5.1

### Patch Changes
Expand Down
12 changes: 9 additions & 3 deletions plugins/wme-sitebuilder/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,19 @@
- @moderntribe/sitebuilder@2.0.0
- @moderntribe/storebuilder@2.0.0

## 0.5.1

### Patch Changes

- Updated dependencies [9ccf6b6]
- Updated dependencies [18a78d5]
- @moderntribe/sitebuilder@1.7.1
- @moderntribe/storebuilder@1.5.2

## 0.5.0

### Minor Changes

- fcadf1d: Consolidate the WME Sitebuilder WordPress plugin and library into the same repository with other Sitebuilder packages.

### Patch Changes

- Updated dependencies [0413284]
- @moderntribe/sitebuilder@1.7.0

0 comments on commit 56c8bfa

Please sign in to comment.