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

[RELEASES] 2.3.0 #5560

Merged
merged 39 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
8f7a608
chore: set version to 2.3.0dev0
jfcalvo Sep 17, 2024
102d1d1
[ENHANCEMENT] `argilla server`: Add support for filter on list datase…
frascuchon Sep 18, 2024
1c1d287
ci: Using develop image tag
frascuchon Sep 18, 2024
63d620d
[CI] fix failing tests (#5507)
frascuchon Sep 18, 2024
92deea7
[FEATURE] add different error handling strategies to the log method …
burtenshaw Sep 18, 2024
1d9dbad
[ENHANCEMENT] Get record by ID - refresh record resource (#5500)
frascuchon Sep 19, 2024
e315c2f
Merge branch 'main' into develop
jfcalvo Sep 19, 2024
7783d73
ci: Using develop argilla docker tag
frascuchon Sep 23, 2024
0df40d2
[BUGFIX] `argilla`: Fix some `from_hub` method errors (#5523)
frascuchon Sep 23, 2024
43239ec
[Bugfix] `argilla server`: allow define workspace for argilla server …
frascuchon Sep 23, 2024
496a8c3
Merge branch 'main' into develop
jfcalvo Sep 23, 2024
aae998a
[ENHANCEMENT] `argilla-server`: List records endpoint using db (#5170)
frascuchon Sep 23, 2024
56efd57
Addition of USERNAME and PASSWORD to environment variables to create …
bikash119 Sep 24, 2024
0ba6233
fix: Including settings when loading record vectors (#5531)
frascuchon Sep 24, 2024
350474a
[BUGFIX] `argilla`: improve `from_hub` robustness (#5524)
frascuchon Sep 25, 2024
c18396c
Merge branch 'main' into develop
frascuchon Sep 25, 2024
7624f31
chore: Update changelog
frascuchon Sep 25, 2024
b3a7d2e
🐛 Fix copy to clipboard on insecure context (#5535)
damianpumar Sep 26, 2024
86008cd
🚀 Autofill (#5522)
damianpumar Sep 26, 2024
5875d59
[ENHANCEMENT] `argilla`: Add limit argument when getting records (#5525)
frascuchon Sep 27, 2024
d57a83b
[ENHANCEMENT] `argilla`: link user responses and suggestions to recor…
frascuchon Sep 27, 2024
ebaff3e
__repr__ implemented for SettingProperties. (#5497)
bikash119 Sep 30, 2024
12f5109
Feat: 5530 feature updated at inserted at properties on retrieved rec…
davidberenstein1957 Sep 30, 2024
022b414
Helm chart (#5512)
bikash119 Oct 1, 2024
550f76f
feat: Improve search support from SDK (#5545)
frascuchon Oct 1, 2024
3032d3a
[FEATURE] update token retrieval logic (#5541)
not-lain Oct 1, 2024
a150b55
fix: get default workspace if exits when creating default user (#5558)
frascuchon Oct 2, 2024
de5085d
[BUGFIX] serialize-chat-fields (#5553)
burtenshaw Oct 2, 2024
efc4a56
[FEATURE] custom-field-support (#5422)
burtenshaw Oct 2, 2024
cbbcef2
chore: Set release version
frascuchon Oct 2, 2024
1cabd11
chore: Review changelog
frascuchon Oct 2, 2024
4f4125e
Enhancement/improve-error-messaging-for-role-forbidden (#5554)
burtenshaw Oct 2, 2024
7c1e5d8
chore: update changelog
burtenshaw Oct 2, 2024
5fba869
Merge branch 'releases/2.3.0' of https://github.com/argilla-io/argill…
burtenshaw Oct 2, 2024
d37566c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 2, 2024
7549a45
fix: Search custom fields with multiple type of values (#5559)
frascuchon Oct 2, 2024
0d2032a
chore: Review changelog
frascuchon Oct 3, 2024
0b4683b
[REFACTOR]: validate custom fields when creating or updating settings…
frascuchon Oct 3, 2024
1e54a48
docs: Custom Field outline (#5536)
davidberenstein1957 Oct 3, 2024
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: 1 addition & 1 deletion .github/workflows/argilla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
build:
services:
argilla-server:
image: argilladev/argilla-hf-spaces:pr-5482
image: argilladev/argilla-hf-spaces:pr-5422
ports:
- 6900:6900
env:
Expand Down
13 changes: 12 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ repos:
rev: v4.6.0
hooks:
- id: check-yaml
exclude: argilla/mkdocs.yml
exclude: argilla/mkdocs.yml|examples/deployments/k8s
- id: end-of-file-fixer
exclude_types: [text, jupyter]
- id: trailing-whitespace
Expand Down Expand Up @@ -71,6 +71,17 @@ repos:
- argilla-server/LICENSE_HEADER
- --fuzzy-match-generates-todo

##############################################################################
# Helm lint hook
##############################################################################
- repo: https://github.com/gruntwork-io/pre-commit
rev: v0.1.23
hooks:
- id: helmlint
name: Helm lint
files: '^examples/deployments/k8s/.*\.yaml$'
args: ['helm', 'lint','examples/deployments/k8s/']

ci:
autofix_commit_msg: |
[pre-commit.ci] auto fixes from pre-commit.com hooks
Expand Down
11 changes: 11 additions & 0 deletions argilla-frontend/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,17 @@ These are the section headers that we use:

## [Unreleased]()

## [2.3.0](https://github.com/argilla-io/argilla/compare/v2.2.0...v2.3.0)

### Added

- Added new field `CustomField` [#5462](https://github.com/argilla-io/argilla/pull/5462)

### Fixed

- Fix autofill form on sign-in page [#5522](https://github.com/argilla-io/argilla/pull/5522)
- Support copy on clipboard for no secure context [#5535](https://github.com/argilla-io/argilla/pull/5535)

## [2.2.0](https://github.com/argilla-io/argilla/compare/v2.1.0...v2.2.0)

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
title,
content,
settings,
sdkRecord,
isTextType,
isImageType,
isChatType,
Expand All @@ -30,6 +31,7 @@
:fieldText="content"
:useMarkdown="settings.use_markdown"
:searchText="recordCriteria.committed.searchText.value.text"
:record="record"
/>
<ChatField
v-else-if="isChatType"
Expand All @@ -39,7 +41,20 @@
:content="content"
:searchText="recordCriteria.committed.searchText.value.text"
/>
<ImageField v-else :name="name" :title="title" :content="content" />
<ImageField
v-else-if="isImageType"
:name="name"
:title="title"
:content="content"
/>
<CustomField
v-else
:name="name"
:title="title"
:content="content"
:sdkRecord="sdkRecord"
:settings="settings"
/>
</div>
</div>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<div class="chat" :key="title">
<span class="chat__title" v-text="title" />
<div
:id="`fields-content-${name}`"
class="chat__wrapper"
:class="checkIfAreLessThanTwoRoles ? '--simple' : '--multiple'"
>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<template>
<div class="custom_field_component" :key="content">
<div class="title-area --body2">
<span class="custom_field_component__title-content" v-text="title" />
</div>
<Sandbox :content="template" />
</div>
</template>
<script>
/* eslint-disable */
const BASIC_TEMPLATE = `
<script>const record = #RECORD_OBJECT#;<\/script>
<script src="./js/handlebars.min.js"><\/script>
<div id="template">
#TEMPLATE#
</div>
<script>
Handlebars.registerHelper("json", (context) => {
return new Handlebars.SafeString('<pre style="overflow: auto">' + JSON.stringify(context, null, 4) + '</pre>');
});

const template = document.getElementById("template").innerHTML;
const compiledTemplate = Handlebars.compile(template);
const html = compiledTemplate({ record });
document.body.innerHTML = html;
<\/script>
`;
const ADVANCE_TEMPLATE = `
<script>
const record = #RECORD_OBJECT#;
<\/script>
#TEMPLATE#
`;

export default {
props: {
name: {
type: String,
required: true,
},
title: {
type: String,
required: true,
},
settings: {
type: Object,
required: true,
},
content: {
type: String,
required: true,
},
sdkRecord: {
type: Object,
required: true,
},
},
computed: {
isAdvanced() {
return this.settings.advanced_mode;
},
template() {
const recordObject = JSON.stringify(this.sdkRecord);

const templateToUse = this.isAdvanced ? ADVANCE_TEMPLATE : BASIC_TEMPLATE;

return templateToUse
.replace("#RECORD_OBJECT#", recordObject)
.replace("#TEMPLATE#", this.content);
},
},
};
</script>

<style lang="scss" scoped>
.custom_field_component {
$this: &;
display: flex;
flex-direction: column;
gap: $base-space;
padding: 2 * $base-space;
background: var(--bg-field);
border-radius: $border-radius-m;
border: 1px solid var(--border-field);
.title-area {
display: flex;
align-items: center;
justify-content: space-between;
gap: $base-space;
color: var(--fg-secondary);
}
&__title-content {
word-break: break-word;
width: calc(100% - 30px);
}
}
</style>
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<template>
<iframe
:srcdoc="template"
ref="iframe"
frameborder="0"
scrolling="no"
@load="load"
/>
</template>
<script>
/* eslint-disable */
const STYLES = `
<script>
if (parent) {
const currentHead = document.getElementsByTagName("head")[0];
const styles = parent.document.getElementsByTagName("style");
for (const style of styles) {
currentHead.appendChild(style.cloneNode(true));
}

const html = parent.document.getElementsByTagName("html")[0];
document.getElementsByTagName("html")[0].setAttribute("data-theme", html.getAttribute("data-theme"));
}
<\/script>
<style>
body {
background-color: var(--bg-field);
}
<\/style>
`;

export default {
props: {
content: {
type: String,
required: true,
},
},
methods: {
load() {
this.resize();
},
resize() {
this.$refs.iframe.style.height =
this.$refs.iframe.contentWindow.document.documentElement.scrollHeight +
"px";
},
},
computed: {
template() {
return `${STYLES}${this.content}`;
},
},
};
</script>

<style>
iframe {
border: none;
width: 100%;
}
</style>

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
</BaseButton>
</BaseActionTooltip>
</div>
<div :id="`fields-content-${name}`" class="content-area --body1">
<div :class="classes" v-if="!useMarkdown" v-html="fieldText" />
<Sandbox v-else-if="isHTML" :fieldText="fieldText" />
<MarkdownRenderer v-else :markdown="fieldText" />
<div class="content-area --body1">
<MarkdownRenderer v-if="useMarkdown" :markdown="fieldText" />
<Sandbox v-else-if="isHTML" :content="fieldText" />
<div :class="classes" v-html="fieldText" />
<template>
<style :key="name" scoped>
::highlight(search-text-highlight-{{name}}) {
Expand Down Expand Up @@ -56,6 +56,9 @@ export default {
type: Boolean,
default: false,
},
record: {
type: Object,
},
},
computed: {
classes() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@
<input type="text" id="field.id" v-model="field.title" />
</Validation>

<div class="settings__edition-form__group" v-if="field.isCustomType">
<label>{{ $t("template") }}</label>
<div class="settings__custom-field-preview">
<pre><code v-highlight>{{ field.settings.template }}</code></pre>
</div>
</div>

<BaseSwitch
v-if="field.isTextType || field.isChatType"
class="settings__edition-form__switch"
Expand Down Expand Up @@ -171,5 +178,16 @@ export default {
gap: $base-space;
}
}
&__custom-field-preview {
overflow: auto;
max-height: 30vh;
padding: $base-space * 2;
border: 1px solid var(--bg-opacity-10);
border-radius: $border-radius;
background: var(--bg-opacity-4);
pre {
margin: 0;
}
}
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<label class="input-field__label" v-text="name" :for="name" />
<span class="input-field__container">
<input
ref="input"
:aria-labelledby="name"
v-model="inputValue"
class="input-field__input"
Expand Down Expand Up @@ -73,13 +74,19 @@ export default {
isTouched: false,
isBlurred: false,
isPasswordVisible: false,
isAutoFilled: false,
};
},
model: {
prop: "value",
event: "input",
},
watch: {
isAutoFilled(newValue) {
if (newValue) {
this.value = `${this.value} `;
}
},
inputValue(newValue) {
this.$emit("input", newValue);
},
Expand Down Expand Up @@ -108,7 +115,21 @@ export default {
: this.type;
},
},
async mounted() {
this.isAutoFilled = await this.detectAutofill(this.$refs.input);
},
methods: {
detectAutofill(element) {
return new Promise((resolve) => {
setTimeout(() => {
resolve(
window
.getComputedStyle(element, null)
.getPropertyValue("appearance") === "menulist-button"
);
}, 200);
});
},
toggleVisibility() {
this.isPasswordVisible = !this.isPasswordVisible;
},
Expand Down
Loading
Loading