Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POC: Use Codex in NewLexemeForm #747

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ <h1>New Lexeme</h1>
import DevLexemeCreator from './src/data-access/DevLexemeCreator';
import DevLangCodeRetriever from './src/data-access/DevLangCodeRetriever';
import LanguageItemSearcher from './src/data-access/LanguageItemSearcher';
import '@wikimedia/codex/dist/codex.style.css';
import '@wikimedia/codex-design-tokens/theme-wikimedia-ui.css';

const config = {
rootSelector: '#app',
Expand Down
152 changes: 152 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
"node": ">=16"
},
"dependencies": {
"@wikimedia/codex": "^1.12.0",
"@wikimedia/codex-design-tokens": "^1.12.0",
"@wmde/wikibase-datamodel-types": "^0.2.0",
"@wmde/wikit-tokens": "^3.0.0-alpha.12",
"@wmde/wikit-vue-components": "^3.0.0-alpha.12",
Expand Down
19 changes: 10 additions & 9 deletions src/components/NewLexemeForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
ref,
} from 'vue';
import { useStore } from 'vuex';
import { Button as WikitButton } from '@wmde/wikit-vue-components';
import { CdxButton } from '@wikimedia/codex';
import { useConfig } from '@/plugins/ConfigPlugin/Config';
import { useMessages } from '@/plugins/MessagesPlugin/Messages';
import LemmaInput from '@/components/LemmaInput.vue';
Expand Down Expand Up @@ -176,21 +176,22 @@ export default {
<span v-html="error" />
</error-message>
<div>
<wikit-button
<cdx-button
class="form-button-submit"
type="progressive"
variant="primary"
native-type="submit"
action="progressive"
weight="primary"
type="submit"
:disabled="submitting"
>
{{ submitButtonText }}
</wikit-button>
</cdx-button>
</div>
</form>
</template>

<style scoped lang="scss">
@import '@wmde/wikit-tokens/variables';
@import '@wmde/wikit-tokens/variables'; // TODO remove
@import '@wikimedia/codex-design-tokens/theme-wikimedia-ui';
@import '@wmde/wikit-vue-components/src/styles/mixins/Typography';

.wbl-snl-form {
Expand All @@ -203,9 +204,9 @@ export default {

// Border
border-style: $border-style-base;
border-width: $border-width-thin;
border-width: $border-width-base;
border-radius: $border-radius-base;
border-color: $border-color-base-subtle;
border-color: $border-color-muted;
}

.wbl-snl-copyright {
Expand Down
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function getBuildConfig( isAppBuild: boolean ): BuildOptions {
formats: [ 'cjs' ],
},
rollupOptions: {
external: [ 'vue', 'vuex' ],
external: [ 'vue', 'vuex', '@wikimedia/codex' ],
},
};
}
Expand Down
Loading