diff --git a/.github/selenium_tests/selenium_tests.py b/.github/selenium_tests/selenium_tests.py deleted file mode 100644 index 9c6a8b5aa..000000000 --- a/.github/selenium_tests/selenium_tests.py +++ /dev/null @@ -1,42 +0,0 @@ -from selenium import webdriver -from selenium import webdriver -from webdriver_manager.chrome import ChromeDriverManager - -driver = webdriver.Chrome(ChromeDriverManager().install()) -from selenium.webdriver.chrome.options import Options -from selenium.webdriver.chrome.service import Service -from selenium.webdriver.support.ui import WebDriverWait -from selenium.webdriver.support import expected_conditions as EC -import time -import sys - -url = sys.argv[1] - -chrome_service = Service( - ChromeDriverManager(chrome_type=ChromeType.CHROMIUM).install()) - -chrome_options = Options() -options = [ - "--headless", "--disable-gpu", "--window-size=1920,1200", - "--ignore-certificate-errors", "--disable-extensions", "--no-sandbox", - "--disable-dev-shm-usage", "--disable-web-security" -] -for option in options: - chrome_options.add_argument(option) - -driver = webdriver.Chrome(service=chrome_service, options=chrome_options) - -#driver.get('http://nytimes.com') - -driver.get(url) - -print(url) -print("###") -time.sleep(20) - -print(driver.get_log("browser")) - -if driver.find_elements_by_css_selector('#view-main'): - print("Element exists") -else: - raise ValueError("Could not find element") diff --git a/.github/workflows/docker-publish-frontend.yml b/.github/workflows/docker-publish-frontend.yml deleted file mode 100644 index 466a409a9..000000000 --- a/.github/workflows/docker-publish-frontend.yml +++ /dev/null @@ -1,80 +0,0 @@ -name: Docker publish frontend - -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - -on: - repository_dispatch: - workflow_dispatch: - schedule: - - cron: "37 18 * * *" - push: - branches: [master] - # Publish semver tags as releases. - tags: ["v*.*.*"] - pull_request: - branches: [master] - -env: - # Use docker.io for Docker Hub if empty - REGISTRY: docker.io - # github.repository as / - IMAGE_NAME: theosanderson/taxonium_frontend - -jobs: - build: - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - # This is used to complete the identity challenge - # with sigstore/fulcio when running outside of PRs. - id-token: write - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - # Install the cosign tool except on PR - # https://github.com/sigstore/cosign-installer - - name: Install cosign - if: github.event_name != 'pull_request' - uses: sigstore/cosign-installer@d6a3abf1bdea83574e28d40543793018b6035605 - with: - cosign-release: "v1.7.1" - - # Workaround: https://github.com/docker/build-push-action/issues/461 - - name: Setup Docker buildx - uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf - - # Login against a Docker registry except on PR - # https://github.com/docker/login-action - - name: Log into registry ${{ env.REGISTRY }} - if: github.event_name != 'pull_request' - uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c - with: - registry: ${{ env.REGISTRY }} - username: theosanderson - password: ${{ secrets.DOCKER_TOKEN }} - - # Extract metadata (tags, labels) for Docker - # https://github.com/docker/metadata-action - - name: Extract Docker metadata - id: meta - uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - - # Build and push Docker image with Buildx (don't push on PR) - # https://github.com/docker/build-push-action - - name: Build and push Docker image - id: build-and-push - uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a - with: - context: . - file: ./Dockerfile.frontend - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/electron-build.yml b/.github/workflows/electron-release.yml similarity index 99% rename from .github/workflows/electron-build.yml rename to .github/workflows/electron-release.yml index 9601e3794..995f42f5c 100644 --- a/.github/workflows/electron-build.yml +++ b/.github/workflows/electron-release.yml @@ -1,8 +1,6 @@ name: Electron build/release on: - push: - pull_request: release: types: - created diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml deleted file mode 100644 index 71571fbea..000000000 --- a/.github/workflows/integration-test.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Integration Test - -on: - repository_dispatch: - workflow_dispatch: - push: - pull_request: - branches: [master] - schedule: - - cron: "0 0 * * *" -jobs: - build: - uses: ./.github/workflows/frontend-test.yml - python: - uses: ./.github/workflows/python-test.yml - # selenium: - # needs: [build, python] - # uses: ./.github/workflows/selenium-test.yml diff --git a/.github/workflows/selenium-test.yml b/.github/workflows/selenium-test.yml deleted file mode 100644 index caf8a6731..000000000 --- a/.github/workflows/selenium-test.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Selenium - -on: - workflow_call: - -jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Installed package list - run: apt list --installed - - uses: actions/download-artifact@v3 - with: - name: tfci-taxonium-config - path: ./data/ - - uses: actions/download-artifact@v3 - with: - name: taxonium_website_build - path: ./web/ - - uses: actions/setup-python@v3 - with: - python-version: "3.8" - - name: Start server - run: python -m http.server & - working-directory: ./web/ - - name: Start server - run: | - ls - python -m http.server 3000 & - working-directory: ./data/ - - name: Installed package list - run: apt list --installed - - name: Remove Chrome - run: sudo apt purge google-chrome-stable - - name: Remove default Chromium - run: sudo apt purge chromium-browser - - name: Install a new Chromium - run: sudo apt install -y chromium-browser - - name: Install all necessary packages - run: pip install requests beautifulsoup4 pandas webdriver-manager selenium - - name: Run the selenium script - run: python .github/selenium_tests/selenium_tests.py "http://localhost:8000/?protoUrl=http://localhost:3000/tfci-taxonium-config.jsonl.gz" diff --git a/taxonium_website/src/components/AboutOverlay.jsx b/taxonium_website/src/components/AboutOverlay.jsx index e0f58bc14..b01df8a64 100644 --- a/taxonium_website/src/components/AboutOverlay.jsx +++ b/taxonium_website/src/components/AboutOverlay.jsx @@ -1,9 +1,34 @@ import React, { useRef, useEffect } from "react"; import Modal from "react-modal"; +const modalStyle = { + content: { + top: "50%", + left: "50%", + transform: "translate(-50%, -50%)", + backgroundColor: "#fafafa", + border: "1px solid #e2e8f0", + borderRadius: "8px", + padding: "20px", + maxWidth: "700px", + maxHeight: "80vh", + minWidth: "400px", + minHeight: "400px", + fontSize: "13px", + }, + overlay: { + backgroundColor: "rgba(100, 100, 100, 0.3)", + zIndex: 1000, + }, +}; + function AboutOverlay({ enabled, setEnabled, overlayContent }) { return ( - setEnabled(false)}> + setEnabled(false)} + style={modalStyle} + >