8000 General UI Enhancements and Fixes by itsmohmans · Pull Request #158 · jordanopensource/nuha-web · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

General UI Enhancements and Fixes #158

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

Merged
merged 29 commits into from
Jun 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
45c2105
fix(#153): font configuration
itsmohmans May 11, 2025
5db5f0d
style(login): use vue's directives
itsmohmans May 13, 2025
6ff2540
fix(#151): separate login buttons loading indicators
itsmohmans May 13, 2025
cb57e55
fix: redesign login page
itsmohmans May 13, 2025
7c26986
style(login): indentation
itsmohmans May 13, 2025
c4dd96e
feat(login): replace redirecting the page with an instant info message
itsmohmans May 16, 2025
4a9ba00
feat(login): add legal info
itsmohmans May 16, 2025
ded1494
feat(tailwind): colors
itsmohmans May 19, 2025
8c31d17
feat: add a unified button component
itsmohmans May 19, 2025
9e7ed21
fix(header): use uibutton component
itsmohmans May 19, 2025
84bb539
refactor(upload-page): remove unused scripts
itsmohmans May 21, 2025
dfb068b
feat(UiButton): improve styling and add icons
itsmohmans May 22, 2025
0396ed4
feat(homepage): change bg and use ui-button
itsmohmans May 22, 2025
2417568
feat(dashboard): redesign the analyze section
itsmohmans May 22, 2025
2d78b2a
fix: a11y fixes
itsmohmans May 27, 2025
90fefc0
chore: add svgo for optimizing svgs
itsmohmans May 29, 2025
abae0e8
fix: styling and remove unused css
itsmohmans May 29, 2025
31e6599
fix: optimize big svg's size by 61%
itsmohmans May 29, 2025
017af97
fix: move used icons from public to assets
itsmohmans May 29, 2025
e72b968
fix: app header styling on mobile and desktop
itsmohmans Jun 3, 2025
54dbac1
fix: 'try it out' button not redirecting to correct locale's login page
itsmohmans Jun 3, 2025
4721242
fix: mobile styling
itsmohmans Jun 3, 2025
d3e2432
fix: hero layout and spacing
itsmohmans Jun 11, 2025
c87f386
feat: add modal for a larger comment box
itsmohmans Jun 12, 2025
164138c
fix: analyze box width
itsmohmans Jun 12, 2025
2411971
fix(results): design and layout issues
itsmohmans Jun 12, 2025
2a761a5
fix(footer): make it stick to bottom
itsmohmans Jun 19, 2025
34b9d4a
fix(login): center login containers
itsmohmans Jun 19, 2025
ca1a2d0
Merge branch 'development' into fix/general-ui-enhancement
itsmohmans Jun 19, 2025
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
17 changes: 11 additions & 6 deletions assets/css/global.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
body {
@apply antialiased m-0;
@apply antialiased m-0 px-20 max-lg:px-5;
@apply font-LTZarid;
}

Expand All @@ -14,10 +14,6 @@ a::selection {
@apply underline;
}

a {
@apply text-sm;
}

button,
a {
@apply font-IBMPlexSansArabic;
Expand Down Expand Up @@ -52,7 +48,7 @@ a {
/* Homepage */
main {
section {
@apply py-20 max-sm:py-5;
@apply py-20 max-lg:py-10;
&:not(:first-child) {
@apply border-nuha-fushia-300 border-t-2;
}
Expand All @@ -61,6 +57,10 @@ main {
@apply grid grid-cols-1 lg:grid-cols-2 place-items-center items-start lg:gap-x-14 gap-y-8;
}
}
.hero-grid {
@apply grid grid-cols-3 max-lg:grid-cols-1;
@apply place-items-start gap-12;
}

.article {
h1,
Expand Down Expand Up @@ -93,3 +93,8 @@ ol {
blockquote {
@apply ps-4 my-4 border-s-2 border-s-nuha-grey-200;
}

textarea, input[type="text"] {
@apply border-2 border-nuha-grey-200 rounded-md p-3;
@apply focus:outline-nuha-fushia-300;
}
15 changes: 9 additions & 6 deletions assets/css/tailwind.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,24 @@

@layer base {
h1 {
@apply text-7xl;
@apply text-7xl max-lg:text-6xl;
}
h2 {
@apply text-4xl;
@apply text-4xl max-lg:text-3xl;
}
h3 {
@apply text-3xl;
@apply text-3xl max-lg:text-2xl;
}
h4 {
@apply text-2xl;
@apply text-2xl max-lg:text-lg;
}
h5 {
@apply text-xl;
@apply text-xl max-lg:text-base;
}
h6 {
@apply text-lg;
@apply text-lg max-lg:text-base;
}
h1, h2, h3, h4, h5, h6 {
@apply max-lg:font-semibold;
}
}
1 change: 1 addition & 0 deletions assets/images/hero-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/images/icons/burger-menu.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/images/icons/mdi_github.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/images/meth-hero.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion components/Charts/Legend.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class="legend-item"
>
<div
class="w-6 aspect-square h-full"
class="w-6 h-6 aspect-square"
:style="`background-color: ${item.color};`"
></div>
<div class="flex flex-col">
Expand Down
7 changes: 4 additions & 3 deletions components/Charts/Pie.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<template>
<div class="h-full w-full mb-10">
<div ref="chart" class="chart-container">
<div class="chart-container">
<div ref="chart"></div>
<ChartsLegend v-if="showLegend" :data="data" />
</div>
<slot name="caption" />
Expand Down Expand Up @@ -70,7 +71,7 @@

<style lang="postcss" scoped>
.chart-container {
@apply flex flex-row-reverse justify-center items-center gap-8 max-sm:flex-col-reverse;
@apply p-8 h-full border-y-2 border-nuha-grey-100 border-opacity-50;
@apply flex flex-row justify-center items-center gap-8 max-sm:flex-col;
@apply lg:p-8 h-full border-y-2 border-nuha-grey-100 border-opacity-50;
}
</style>
8 changes: 4 additions & 4 deletions components/Dashboard/Hero.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<template>
<div class="grid grid-cols-1 md:grid-cols-2 items-top gap-5 my-5 lg:my-20">
<div class="hero-grid">
<h1>{{ t('dashboard.title') }}</h1>
<p class="text-4xl">{{ t('dashboard.description') }}</p>
<p class="text-4xl col-span-2 max-lg:text-3xl lg:px-8">
{{ t('dashboard.description') }}
</p>
</div>
</template>

<script setup lang="ts">
const { t } = useI18n()
</script>

<style scoped lang="postcss"></style>
70 changes: 26 additions & 44 deletions components/Dashboard/Result.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template>
<div class="mb-20">
<div class="grid grid-cols-1 lg:grid-cols-2 mt-10 mb-20 gap-y-10">
<div class="mb-20 p-4">
<div class="grid grid-cols-1 lg:grid-cols-2 mb-20 gap-10">
<h2 class="text-4xl">{{ t('predictionResult.title') }}</h2>
<div v-if="!isSingleComment">
<div v-if="!isSingleComment" class="font-IBMPlexSansArabic text-lg flex flex-col gap-4">
<p>
{{ t('predictionResult.fileName') }}
<span class="text-nuha-fushia">
Expand All @@ -15,10 +15,16 @@
{{ importedRows }}
</span>
</p>
<button @click="downloadResults" class="download-btn">
<UiButton
@click="downloadResults"
variant="outline"
class="w-fit"
>
{{ t('data.downloadResults') }}
<div class="arrow-icon rotate-90"></div>
</button>
<template #icon>
<IconDownload class="[&_path]:fill-current"/>
</template>
</UiButton>
</div>
<div v-else>
<p class="text-xl">
Expand All @@ -31,11 +37,12 @@
</div>
<div v-if="!isSingleComment">
<div
class="w-full grid grid-cols-2 max-lg:grid-cols-1 gap-20 justify-center items-center mb-20"
class="w-full grid grid-cols-2 max-lg:grid-cols-1 gap-10 justify-center items-center mb-20"
>
<ChartsPie
:data="chartData"
:size="300"
:size="width > 768 ? 300 : 150"
:max-width="150"
show-legend
>
<template #caption>
Expand All @@ -62,7 +69,7 @@

<div class="block w-full my-10">
<div class="flex justify-between items-center py-5">
<h5>{{ t('predictionResult.details') }}:</h5>
<h2>{{ t('predictionResult.details') }}:</h2>
</div>
<el-table
:data="commentData"
Expand Down Expand Up @@ -144,8 +151,9 @@
</template>

<script setup lang="ts">
import { get } from '@vueuse/core'
import { get, useWindowSize } from '@vueuse/core'
const { t } = useI18n()
const { width } = useWindowSize()

const props = defineProps({
predictionData: Object as PropType<{
Expand Down Expand Up @@ -215,67 +223,41 @@
@apply rtl:!text-right;
}

button.btn-prev,
button.btn-next {
@apply rtl:!rotate-180;
}

.download-btn {
@apply border p-3 max-h-9 flex items-center justify-center text-lg;
@apply border-nuha-fushia-300;
@apply bg-nuha-white text-nuha-fushia-300;
@apply hover:bg-nuha-fushia-300 hover:text-nuha-white;
}
.download-btn:hover .arrow-icon {
@apply bg-[url('/icons/arrow-right-white.svg')];
}
.arrow-icon {
@apply w-5 h-5 transform text-black;
@apply bg-[url('/icons/arrow-right.svg')] bg-cover;
}

/* Results Table Styling */
table, tbody, td {
@apply max-sm:inline !bg-nuha-white text-black text-xl;
table {
@apply max-sm:inline !bg-white text-xl;
}
tr {
@apply max-sm:flex flex-col max-sm:!p-1 max-sm:pb-4 max-sm:!mx-4 max-sm:!my-4;
@apply !bg-nuha-white;
@apply max-sm:border-b-2 border-nuha-grey-200 border-dashed border-opacity-50;
td {
@apply !py-8 max-sm:!py-2;
@apply !border-0 !border-nuha-grey-100;
@apply !border-dotted !border-b max-sm:border-opacity-50;

&:last-child {
@apply max-sm:!border-0;
}

&.comment-text div.cell {
direction: rtl;
text-align: right;
}
}
}
.comment-text .cell {
direction: rtl;
text-align: right;
}
table.el-table__header {
@apply max-sm:hidden;
@apply border-t-2 border-nuha-grey-100;
thead {
th {
@apply !bg-nuha-white !py-4;
@apply !py-4;
@apply !border-0 !border-b-2 !border-dotted !border-nuha-grey border-opacity-70;
}
}
}
.el-table .cell {
@apply break-normal;
}
.table-container {
@apply !bg-transparent;
}
.el-pagination.is-background .btn-next,
.el-pagination.is-background .btn-prev,
.el-pagination.is-background li {
@apply !bg-transparent font-IBMPlexSansArabic !text-sm;
@apply font-IBMPlexSansArabic !text-sm;
}
</style>
49 changes: 23 additions & 26 deletions components/Dashboard/Upload/File.vue
94F7
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
<template>
<div class="flex flex-col gap-6">
<p class="leading-none">{{ t('dashboard.steps.step2.descriptionFile') }}</p>
<div class="w-fit max-lg:w-full">
<div class="mb-4">{{ t('dashboard.steps.step2.descriptionFile') }}</div>

<div class="flex gap-4 items-center flex-wrap">
<label class="btn select-file" for="file-upload"
>{{
!file
? t('dashboard.fileUpload.selectFile')
: `${t('dashboard.fileUpload.selected')}: ${file.name}`
}}
<span class="mt-1 ms-1 rtl:rotate-180">→</span>
</label>
<UiButton @click="() => clickUpload()" variant="outline" class="max-lg:w-full">
<label for="file-upload" class="cursor-pointer">
{{
!file
? t('dashboard.fileUpload.selectFile')
: `${t('dashboard.fileUpload.selected')}: ${file.name}`
}}
</label>
<template #icon>
<IconUploadFile class="[&_path]:fill-current" />
</template>
</UiButton>

<button @click="downloadTemplate" class="btn">
<UiButton @click="downloadTemplate" variant="ghost" class="max-lg:w-full">
{{ t('dashboard.fileUpload.downloadTempalte') }}
<span class="mt-1 ms-1 rtl:rotate-180">→</span>
</button>
<template #icon>
<IconDownload class="[&_path]:fill-current" />
</template>
</UiButton>
</div>
</div>

Expand Down Expand Up @@ -58,18 +64,9 @@
a.download = 'template.csv'
a.click()
}
</script>

<style lang="postcss" scoped>
.btn {
@apply border p-3 flex items-center justify-center text-lg max-h-9;
@apply border-nuha-fushia-300;
@apply text-nuha-fushia-300 font-IBMPlexSansArabic;
@apply hover:bg-nuha-fushia-200;
}
.select-file {
@apply cursor-pointer;
@apply !bg-nuha-fushia-300 text-nuha-white;
@apply hover:!bg-nuha-fushia-200 hover:!text-nuha-fushia-300;
function clickUpload() {
const fileInput = document.getElementById('file-upload') as HTMLInputElement
fileInput.click()
}
</style>
</script>
Loading
0