F0rce / ace

Ace Editor for Vaadin 14 & 23
MIT License
27 stars 13 forks source link

Editor not showing in UI #47

Closed n0eL1405 closed 1 month ago

n0eL1405 commented 1 month ago

Describe the bug Like in #34 the AceEditor is invisible. I can see it with the browser inspection tool but nothing on screen. I tried the steps mentioned in #34 but nothing worked. There are some errors in the browser console, but I don't think they are related.

To Reproduce Not sure how to reproduce. Using the Demo Project from https://start.vaadin.com/app and adding AceEditor works fine.

Expected behavior AceEditor on page.

Screenshots screenshot1 Screenshot 2024-09-18 141542 Screenshot 2024-09-18 141604 Screenshot 2024-09-18 141624

Desktop (please complete the following information):

Additional context Root POM:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <version>3.2.1</version>
    </parent>
    <version>3.25.0-SNAPSHOT</version>
    <packaging>pom</packaging>
    <modules>
        <module>container</module>
        <module>model</module>
        <module>service</module>
        <module>ui</module>
        <module>backend</module>
    </modules>

    <properties>
        <java.version>17</java.version>

        <vaadin.version>23.3.4</vaadin.version>
        <apexcharts.version>23.0.1</apexcharts.version>
        <lombok.version>1.18.30</lombok.version>
        <jackson.version>2.13.4.1</jackson.version>
        <jetbrains-annotations.version>24.0.1</jetbrains-annotations.version>
        <vaadin-maven-plugin.version>23.3.4</vaadin-maven-plugin.version>
        <ace-editor.version>3.4.2</ace-editor.version>
        <sentry-io-version>7.10.0</sentry-io-version>

    </properties>

    <dependencyManagement>
        <dependencies>

            <dependency>
                <groupId>com.github.appreciated</groupId>
                <artifactId>apexcharts</artifactId>
                <version>${apexcharts.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>com.vaadin</groupId>
                        <artifactId>vaadin-core</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>de.f0rce</groupId>
                <artifactId>ace</artifactId>
                <version>${ace-editor.version}</version>
            </dependency>

            <!-- SENTRY.IO -->
            <dependency>
                <groupId>io.sentry</groupId>
                <artifactId>sentry-bom</artifactId>
                <version>${sentry-io-version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <!-- Die mitgelieferten Lombok-Versionen scheinen zu alt zu sein, daher müssen wir eine neuere Version (min. 1.18.30) extra laden -->
            <dependency>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>${lombok.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <scm>
        <tag>HEAD</tag>
        <developerConnection></developerConnection>
    </scm>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.4.1</version>
                    <configuration>
                        <failOnError>false</failOnError>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <configuration>
                        <projectVersionPolicyId>SemVerVersionPolicy</projectVersionPolicyId>
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>bugfix</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-release-plugin</artifactId>
                        <configuration>
                            <projectVersionPolicyId>default</projectVersionPolicyId>
                            <autoVersionSubmodules>true</autoVersionSubmodules>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <repositories>
        <repository>
            <id>nexus</id>
            <url></url>
        </repository>
        <repository>
            <id>nexus-snapshots</id>
            <url></url>
        </repository>
        <repository>
            <id>vaadin-addons</id>
            <url>https://maven.vaadin.com/vaadin-addons</url>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>nexus</id>
            <url></url>
        </pluginRepository>
    </pluginRepositories>
</project>

UI POM:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId></groupId>
        <artifactId></artifactId>
        <version>3.25.0-SNAPSHOT</version>
    </parent>

    <artifactId>ui</artifactId>

    <properties>
        <plugin.version.translator-maven-plugin-jre11>1.2</plugin.version.translator-maven-plugin-jre11>
    </properties>

    <dependencies>

        <!-- ADDONS -->
        <dependency>
            <groupId>com.github.appreciated</groupId>
            <artifactId>apexcharts</artifactId>
        </dependency>
        <dependency>
            <groupId>de.f0rce</groupId>
            <artifactId>ace</artifactId>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-maven-plugin</artifactId>
                <version>${vaadin-maven-plugin.version}</version>
                <configuration>
                    <frontendDirectory>${project.basedir}/frontend</frontendDirectory>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare-frontend</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>production</id>
            <properties>
                <vaadin.productionMode>true</vaadin.productionMode>
            </properties>

            <dependencies>
                <dependency>
                    <groupId>com.vaadin</groupId>
                    <artifactId>flow-server-production-mode</artifactId>
                    <version>${vaadin.version}</version>
                </dependency>

                <dependency>
                    <groupId>com.vaadin</groupId>
                    <artifactId>vaadin-core</artifactId>
                    <version>${vaadin.version}</version>
                    <exclusions>
                        <exclusion>
                            <groupId>com.vaadin</groupId>
                            <artifactId>vaadin-dev</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
            </dependencies>

            <build>
                <plugins>
                    <plugin>
                        <groupId>com.vaadin</groupId>
                        <artifactId>flow-maven-plugin</artifactId>
                        <version>${vaadin.version}</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>build-frontend</goal>
                                </goals>
                                <phase>compile</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>

I had to cut out / censor some stuff in the POMs, don't wonder if it seems incomplete.

I hope this is enough information

F0rce commented 1 month ago

Hey @n0eL1405 :)

your pom looks right, maybe this could help you: https://github.com/F0rce/ace/issues/40#issuecomment-1952679698

n0eL1405 commented 1 month ago

That worked, thanks. It was really that easy to fix ^^

Hint for someone having the same issue: In Vaadin 23 (and maybe earlier) the property is vaadin.whitelisted-packages